This repository houses my personal Neovim configuration, built upon NvChad starter framework. It's tailored for working with:
- Python
- Lua
- JavaScript/TypeScript (Node.js)
- C/C++
- CMake
- JSON/YAML/Markdown
- Neovim Version: NVIM v0.11.2 (Build type: Release, LuaJIT 2.1.1741730670)
- Operating System: Ubuntu 24.04.2 LTS (Kernel: 6.11.0-26-generic)
This config uses conform.nvim for code formatting. Formatters are triggered manually on pressing Alt + f.
| Language/Filetype | Formatter(s) Used |
|---|---|
| Python | black |
| Lua | stylua |
| JavaScript/TypeScript | prettier, biome (fallback) |
| C/C++/Objective-C | clang-format |
| JSON/YAML/Markdown/CSS/HTML | prettier, biome (fallback) |
Most formatters can be installed easily using Mason.nvim directly within Neovim.
- Open Neovim:
nvim - Open Mason: Type
:Masonand press Enter. - Search and Install: Find the formatters listed above (e.g.,
black,stylua,prettier,biome,clang-format) and pressito install them.
- Manual Formatting: Press
<Alt-f>(or<M-f>) in Normal, Visual, or Insert mode to format the current buffer. - Automatic Formatting on Save: This is disabled by default. To re-enable it, uncomment the
format_on_saveblock inlua/configs/conform.lua.
This configuration uses the Language Server Protocol (LSP) to provide advanced code intelligence features such as auto-completion, go-to-definition, symbol renaming, and diagnostics. LSP servers are managed and installed via Mason.nvim.
| Language/Filetype | LSP Server(s) Used |
|---|---|
| Python | pyright, ruff |
| C/C++/Objective-C | clangd |
| Bash | bashls (bash-language-server) |
| JavaScript/TypeScript | ts_ls (typescript-language-server) |
| HTML/CSS/JSON/Lua | Pre-configured by NvChad |
Just like formatters, most LSP servers can be installed through Mason.nvim:
- Open Neovim:
nvim - Open Mason: Type
:Masonand press Enter. - Search and Install: Find the LSP servers listed above (e.g.,
pyright,ruff,clangd,bashls,ts_ls) and pressito install them.
This section outlines the primary keybindings configured in this setup for efficient navigation, LSP features, and diagnostic viewing.
| Keybinding | Description |
|---|---|
gd |
Go to Definition |
gD |
Go to Declaration |
gr |
Go to References |
gi |
Go to Implementation |
K |
Hover Documentation |
This setup uses Trouble.nvim for a better, more unified diagnostic and list experience.
| Keybinding | Description |
|---|---|
[d |
Jump to Previous Diagnostic |
]d |
Jump to Next Diagnostic |
<C-o>D |
Toggle all diagnostics in a unified view (Trouble) |
<C-o>d |
Toggle diagnostics for the current buffer only (Trouble) |
- NvChad: The core Neovim framework this configuration is built upon.
- NvChad starter: The foundation repository for this configuration.
- LazyVim: A pioneering Neovim distribution that inspired many modern Neovim configurations.
- lazy.nvim: The fantastic plugin manager.
- conform.nvim: The plugin used for code formatting.
- Mason.nvim: The essential plugin for managing LSP servers, formatters, and debuggers.
- Trouble.nvim: For enhanced diagnostic and list views.