NVIME is a modern Neovim configuration using pure Lua. It leverages the built-in LSP features and improves startup times with lazy.nvim. It also includes file exploration, syntax highlighting, inline hints, and more.
- Make sure your Neovim version ≥ 0.9.
- (Optional) For Arch Linux, run arch-install.sh to install dependencies quickly.
- Otherwise, install required packages manually:
sudo dnf install \ ripgrep \ nodejs \ tree-sitter-cli \ gcc \ g++ \ wget \ unzip
- Clone this repository into your Neovim config path:
git clone https://github.com/MrZLeo/nvime ~/.config/nvim
- Launch Neovim:
Installation starts automatically. Exit once done and reopen Neovim.
nvim
Key Combination | Mode | Description |
---|---|---|
<C-h/j/k/l> |
Normal | Navigate between windows |
<C-h/j/k/l> |
Terminal | Navigate between windows from terminal |
<C-w>k |
Normal | Split window above |
<C-w>h |
Normal | Split window left |
<C-w>j |
Normal | Split window below |
<C-w>l |
Normal | Split window right |
<BackSpace> |
Normal | Clear search highlighting |
q |
Normal/Visual | Close current window |
Q |
Normal | Record macro (replaces default 'q') |
<Space><Space> |
Normal | Save file |
<Leader>ff |
Normal | Find files |
<Leader>fg |
Normal | Live grep |
<Leader>fb |
Normal | List buffers |
<Leader>fh |
Normal | Help tags |
gD |
Normal | Go to declaration |
gd |
Normal | Go to definition (telescope) |
K |
Normal | Show hover information |
gi |
Normal | Go to implementation (telescope) |
gr |
Normal | Find references (telescope) |
<Space>rn |
Normal | Rename symbol |
<Space>f |
Normal | Code action |
<Space>l |
Normal | Show diagnostics (telescope) |
NVIME uses nvim-lspconfig
for LSP support, with configurations organized in the lua/lsp
directory:
lua/lsp/init.lua
: Main LSP initialization and auto-formatting setuplua/lsp/on_attach.lua
: Keybindings and settings applied when LSP attaches to bufferslua/lsp/settings.lua
: Global diagnostic configurations (signs, virtual text, etc.)- Language-specific configs:
lua/lsp/lua.lua
: Lua LSP configurationlua/lsp/rust.lua
: Rust LSP configuration via rustaceanvimlua/lsp/clangd.lua
: C/C++ LSP configuration with inlay hints
-
Install the required language servers:
# Example installations: npm install -g lua-language-server # Lua rustup component add rust-analyzer # Rust sudo pacman -S clang # C/C++
-
LSP servers are configured in
lua/plugins.lua
under thenvim-lspconfig
plugin. To add a new LSP:{ 'neovim/nvim-lspconfig', opts = { servers = { -- Add your LSP config here new_language_server = { -- server-specific settings } } } }
-
LSP features are automatically enabled when editing supported files. Common LSP commands:
gd
: Go to definition (telescope)K
: Show hover informationgi
: Go to implementation- See Key Bindings for more
- Error/warning signs in the gutter
- Hover diagnostics (auto-show on cursor hold)
- Inlay hints for supported languages
- Automatic formatting on save (except for C/C++, you can change it in
lua/lsp/init.lua
)
LSP configurations can be customized by modifying the respective files in the lua/lsp
directory.
That's it! Enjoy your updated Neovim setup.