Skip to content

hyprh/nvimconfig

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nvimconfig

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.

✨ Features

  • 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

📦 Requirements

  • 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-make on PATH (auto-detected)
  • 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

🚀 Installation

# 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
nvim

On Windows the config directory is %LOCALAPPDATA%\nvim.

On first launch:

  1. lazy.nvim installs the plugins and compiles Treesitter parsers automatically.
  2. Install the language servers you need (see above).
  3. Optional: run :Copilot setup to sign in to GitHub Copilot.

🗂️ Layout

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)

⌨️ Keybindings

Leader = Space.

Navigation & editing

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)

Buffers · tree · terminal

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

LSP

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

Diagnostics (Trouble)

Key Action
<leader>xx Workspace diagnostics
<leader>xw Buffer diagnostics
<leader>xq / <leader>xl Quickfix / location list

Telescope

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)

Outline & AI

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

Completion (insert mode)

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

🖥️ Cross-platform notes

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.

🙏 Acknowledgements

Standing on the shoulders of the Neovim ecosystem — lazy.nvim, nvim-cmp, nvim-treesitter, Telescope and many more (see lazy-lock.json).

License

Released under the MIT License.

About

nvim config

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors