This repository contains an optimized Neovim configuration for C/C++ development with powerful plugins for auto-completion, syntax highlighting, Git integration, and more. The setup is intentionally lightweight — fast to start, focused on essentials, and easy to customize to suit your needs.
Together with my other projects vhstack/tmuxpp and vhstack/termpp , it forms a perfectly tuned working environment that provides seamless and efficient use of the Terminal, Tmux, and Neovim.
- LSP support for C/C++ with automatic completion
- Syntax highlighting with Treesitter
- Git integration directly in Neovim
- Advanced file navigation with Telescope and NeoTree
- Terminal integration for smooth development workflows
| Plugin | Description |
|---|---|
telescope |
Advanced fuzzy search and file navigation |
lsp |
Language Server Protocol (LSP) support for C/C++ |
mason |
Easy management of LSP servers, debuggers, and linters |
cmp |
Auto-completion engine for an improved coding workflow |
conform |
Support for code formatting |
lualine |
Customizable status line for Neovim |
gitsigns |
Git integration with inline diff display |
treesitter |
Enhanced syntax highlighting for C/C++ |
toggleterm |
Integrated terminal within Neovim |
outline |
Symbol outline view (e.g., classes, functions) |
autopairs |
Automatic pairing of brackets and quotes |
comments |
Easy commenting of code blocks |
ansi |
Render colored ANSI escape sequences |
buffline |
Enhanced buffer navigation |
blankline |
Visual representation of indent levels |
neotree |
File manager for improved navigation |
neogen |
Documentation generator within source code |
dashboard |
Start screen for Neovim with quick access |
which-key |
Quick display of keybindings |
transparent |
Transparency mode for your color scheme |
Installed color themes:
- kanagawa
- onedark
- glowbeam
- catppuccin (catppuccin-latte, catppuccin-frappe, catppuccin-macchiato, catppuccin-mocha)
Default Theme:
The Catppuccin color scheme with transparency enabled is set as the default.
Option for light themes:
You can use catppuccin-latte (a light variant of Catppuccin) or install other themes that better suit your style.
-
**Install Neovim
-
Install the
rg(Ripgrep) tool -
Install
clangdfor LSP -
Clone the repository & remove the Git directory:
git clone --depth 1 https://github.com/vhstack/nvimpp ~/.config/nvim rm -rf ~/.config/nvim/.git ~/.config/nvim/assets ~/.config/nvim/README*.md
-
Sync plugins with your plugin manager (
Packer,Lazy, etc.) -
Install LSPs & tools via Mason by running
:Masonin Neovim
Optional: To install clangd, open Neovim and run:
:MasonInstall clangd cmake-language-serverIt is recommended to install a Nerd Font to ensure optimal display of symbols and glyphs in the terminal.
Nerd Fonts are available at Nerd Fonts.
Great options include: Cascadia Code, FiraCode, DejaVu Sans Mono, and Cousine.
The ~/.config/nvim/lua/custom directory comes with two sample scripts to help you add your own
configuration tweaks without modifying the main setup:
To use the custom configuration, rename the template files:
mv ~/.config/nvim/lua/custom/_preload.lua ~/.config/nvim/lua/custom/preload.lua
mv ~/.config/nvim/lua/custom/_postload.lua ~/.config/nvim/lua/custom/postload.luaBy adjusting these files, you can add your own extensions like keybindings, plugins, or Lua code without altering the main configuration—your changes will remain intact during future updates.
- Loaded at Neovim startup.
- Set global or environment variables or perform basic initializations here.
- Example: Set LSP flags, load themes, adjust global options.
Available variables in preload.lua:
| Variable | Description | Default |
|---|---|---|
vim.g.colorscheme |
Sets the Neovim color scheme | 'catppuccin' |
vim.g.is_transparency_enabled |
Enables/disables transparency | true |
vim.g.is_lsp_enabled |
Enables/disables LSP features | true |
vim.g.is_git_enabled |
Enables/disables Git features | true |
- Loaded after the main configuration.
- Ideal for keymaps, UI tweaks, and fine-tuning post-initialization.
- Example: Keymap changes, color adjustments, status line tweaks.
This is an overview of the most important keybindings defined in this Neovim configuration. The mappings are set up in Lua and cover a variety of features, from navigation to plugin-specific commands.
| Shortcut | Description |
|---|---|
<Space> |
Leader key |
| Shortcut | Description |
|---|---|
<F2> |
Grep for word under cursor |
<F5> |
Generate documentation with Neogen |
<F8> |
Toggle ANSI color rendering |
<F9>,<leader>m |
Run make |
<F10> |
Run make clean & make -j3 |
<F12> |
Close buffer |
| Shortcut | Description |
|---|---|
<C-k> |
Move window up |
<C-j> |
Move window down |
<C-h> |
Move window left |
<C-l> |
Move window right |
<C-w> |
Switch window |
| Shortcut | Description |
|---|---|
<leader>e, <C-e> |
Toggle NeoTree (sidebar) |
<leader>E |
Open NeoTree in float |
<leader>gs |
Show Git status in NeoTree |
<C-e> |
Toggle NeoTree sidebar |
| Shortcut | Description |
|---|---|
<leader><leader> |
Recently opened files |
<leader>ff, <C-f> |
Find files |
<leader>fw, F2 |
Find word |
<leader>fg, <C-g> |
Live grep search |
<leader>fb, <C-b> |
Open buffers |
<leader>fh |
Search help tags |
| Shortcut | Description |
|---|---|
<leader>gb |
Git branches |
<leader>gc |
Git commits |
<leader>gd |
Git diffs |
<leader>gs |
Git status |
| Shortcut | Description |
|---|---|
<leader>/ |
Toggle comment |
| Shortcut | Description |
|---|---|
| ` | ` |
\ |
Horizontal split (:split) |
| Shortcut | Description |
|---|---|
<Tab>, <C-right> |
Next tab |
<S-Tab>, <C-left> |
Previous tab |
<C-S-right> |
Move tab right |
<C-S-left> |
Move tab left |
| Shortcut | Description |
|---|---|
<leader>tt |
Floating terminal |
<leader>th |
Horizontal terminal |
<leader>tv |
Vertical terminal |
| Shortcut | Description |
|---|---|
<leader>lx, <C-x> |
Diagnostics with Telescope |
<leader>lX |
Diagnostics as float |
[d,ö |
Go to previous diagnostic |
]d,ä |
Go to next diagnostic |
<leader>la |
Code actions |
<leader>ld, <C-p> |
Go to definition |
<leader>lD, gD |
Go to declaration |
<leader>lk, <S-k> |
Hover documentation |
<leader>lr, gr |
Show references |
<leader>lt, gt |
Show type definition |
<leader>lR |
Rename |
<leader>lF |
Format |
<C-p> |
Go to definition |
<C-o> |
Go back |
| Shortcut | Description |
|---|---|
Y |
Yank entire line |
u |
Undo |
U |
Redo |
+ |
Increment number |
- |
Decrement number |
<leader>n |
Toggle line numbers |
<leader>w |
Save file |
<leader>x |
Close buffer |
<leader>s |
Sort buffers by tabs |
<leader>h |
Highlight word or selection |
<leader>H |
Clear all highlights |
<leader>T |
Toggle transparency |
<leader>pl |
Open Lazy plugins |
<leader>pm |
Open Mason plugins |
If you have ideas for new features or want to improve the project, feel free to fork and tailor it to your liking! Have fun and happy coding with nvimpp! 💻🚀





