English · 简体中文
A modern, cross-platform Neovim configuration built on lazy.nvim and Neovim's native LSP. Batteries-included for C/C++, Go, Python, Lua and Shell, with Treesitter, Telescope, completion, Git integration and AI assistants (GitHub Copilot / Codex).
Runs on Linux / WSL and Windows out of the box.
- Plugin management — lazy.nvim with lazy-loading and a committed
lazy-lock.json - LSP — Neovim native
vim.lsp+ nvim-lspconfig; preconfigured servers:clangd,gopls,lua_ls,pyright,bashls - Completion — nvim-cmp + cmp-nvim-lsp + LuaSnip + friendly-snippets + lspkind + nvim-autopairs, with recency-aware sorting and overload-signature display
- Syntax — nvim-treesitter (highlight, indentation, folding)
- Fuzzy finder — Telescope + fzf-native + project.nvim
- UI — kanagawa theme (catppuccin & tokyonight bundled), lualine, bufferline, nvim-tree, aerial outline, indent-blankline, toggleterm
- Git — gitsigns + diffview
- AI — GitHub Copilot (copilot.vim) and Codex (codex.nvim)
- Editing — Comment.nvim, autosave, ergonomic motions
- Neovim ≥ 0.11 (native LSP; developed on 0.12)
- git, a Nerd Font, and ripgrep (Telescope live grep)
- A C compiler for Treesitter parsers and
telescope-fzf-native- Linux / WSL:
gcc/g++/make - Windows:
gcc/g+++mingw32-makeonPATH(auto-detected)
- Linux / WSL:
- Node.js — for GitHub Copilot
- Language servers (install the ones you use; auto-detected at startup):
clangd,gopls,lua-language-server,basedpyright/pyright,bash-language-server
# back up any existing config
mv ~/.config/nvim ~/.config/nvim.bak 2>/dev/null
# clone
git clone https://github.com/hyprh/nvimconfig ~/.config/nvim
# launch — lazy.nvim bootstraps and installs everything
nvimOn Windows the config directory is %LOCALAPPDATA%\nvim.
On first launch:
- lazy.nvim installs the plugins and compiles Treesitter parsers automatically.
- Install the language servers you need (see above).
- Optional: run
:Copilot setupto sign in to GitHub Copilot.
init.vim entry point (leader, options, loads the lua config)
lua/config/
├── init.lua loads options / autocmds / keymaps / plugins
├── options.lua editor options
├── keymaps.lua general keymaps
├── autocmds.lua autocommands (autosave, …)
├── plugins.lua lazy.nvim bootstrap
├── lsp.lua LSP servers + nvim-cmp completion
├── ui.lua colorscheme / statusline / tree / terminal / outline
├── git.lua git integration
├── treesitter.lua treesitter setup
└── plugin_specs/ per-area plugin specs (editor / ui / lsp / git / telescope)
使用说明.md full keymap manual (Chinese)
Leader = Space.
| Key | Action |
|---|---|
<leader>h / <leader>l |
Line start / end |
<leader>b |
Matching bracket |
<C-j> / <C-k> |
Down / up 4 lines |
<C-d> / <C-u> |
Down / up 9 lines |
<leader>/ |
Toggle comment (line / operator) |
| Key | Action |
|---|---|
<leader>bn / <leader>bp |
Next / previous buffer |
<leader>nt |
Toggle file tree (locate current file) |
<C-t> |
Toggle floating terminal |
<leader>ua |
Toggle autosave |
| Key | Action |
|---|---|
gd gD gi gY |
Definition / declaration / implementation / type definition |
gr |
References |
K |
Hover documentation |
gs / gc |
Document / workspace symbols |
[g / ]g |
Previous / next diagnostic |
<leader>e |
Line diagnostics float |
<leader>rn |
Rename symbol |
<leader>cf |
Format (buffer / selection) |
<leader>ac / <leader>as |
Code action |
<leader>qf |
Quick fix |
<leader>ch |
Switch source / header (C/C++) |
<leader>uh |
Toggle inlay hints |
| Key | Action |
|---|---|
<leader>xx |
Workspace diagnostics |
<leader>xw |
Buffer diagnostics |
<leader>xq / <leader>xl |
Quickfix / location list |
| Key | Action |
|---|---|
<leader>ff |
Find files |
<leader>fg |
Live grep |
<leader>fb |
Buffers |
<leader>fo |
Recent files |
<leader>fp |
Projects |
<leader>fc |
Grep word under cursor |
<leader>fh |
Help tags |
<C-j> / <C-k> |
Next / previous item (in picker) |
| Key | Action |
|---|---|
<leader>gv |
Toggle symbol outline (aerial) |
<leader>cc |
Toggle Codex |
<Tab> |
Accept Copilot suggestion, otherwise next completion / snippet jump |
<F2> / <C-g> |
Trigger a Copilot suggestion |
<M-]> / <M-[> |
Next / previous Copilot suggestion |
| Key | Action |
|---|---|
<C-Space> |
Trigger completion |
<CR> |
Confirm |
<C-e> |
Abort |
<C-b> / <C-f> |
Scroll docs up / down |
<Tab> / <S-Tab> |
Next / previous item, snippet jump |
Full keymap reference (Chinese): 使用说明.md
The config targets Linux / WSL and Windows. On Windows it uses mingw32-make to build telescope-fzf-native and sets CC / CXX to gcc / g++ for Treesitter — make sure a MinGW toolchain is on PATH.
Standing on the shoulders of the Neovim ecosystem — lazy.nvim, nvim-cmp, nvim-treesitter, Telescope and many more (see lazy-lock.json).
Released under the MIT License.