This repository contains personal Neovim and Vim configuration files:
- nvim/init.lua (lazy.nvim-based): the Neovim configuration
- vim/vimrc (Vundle-based): a legacy configuration for plain Vim
The configurations are optimized for C/C++/CUDA development with support for various other languages.
Note: the Vundle-based Neovim configuration (
nvim/init.vim) has been removed and is no longer supported.init.luais the only Neovim configuration.
sudo apt-get install -y neovim gitNeovim 0.11 or newer is required — init.lua uses vim.lsp.enable and
vim.diagnostic.jump, which do not exist on 0.9/0.10. Note that apt-get install neovim
ships an older release on Debian/Ubuntu; use the AppImage, the unstable PPA, or a
release tarball if your distribution lags behind.
For full functionality, also install:
# For C/C++ development
sudo apt-get install -y clang clangd ctags
# For font support
sudo apt-get install -y fontconfigNeovim and Vim configuration files will be installed if Neovim or Vim is installed on the system. The configuration files will be installed in the user's home directory.
This installs the Neovim configuration.
./setup-nvim.sh./setup-nvim.batNote: Plugins are installed automatically on the first launch of Neovim.
install.sh installs the plain-Vim configuration (vim/vimrc) with Vundle. It also
installs the Neovim helper scripts (SVN diff/merge wrappers), the Nerd Font, and sets
git core.editor — but it does not install a Neovim configuration; use
setup-nvim.sh for that.
./install.shThere is currently no Windows equivalent of install.sh.
To remove Neovim configuration:
./purge-nvim.sh # Linux
./purge-nvim.bat # WindowsTo remove all Vim and Neovim configurations:
./purge.sh # Linux
./purge.bat # Windows| Plugin | Functionality |
|---|---|
| Chiel92/vim-autoformat | Auto-format code using external formatters |
| altercation/vim-colors-solarized | Solarized color scheme |
| github/copilot.vim | GitHub Copilot AI pair programmer |
| godlygeek/tabular | Text alignment and formatting |
| kien/ctrlp.vim | Fuzzy file finder |
| majutsushi/tagbar | Display tags in a window, ordered by scope |
| morhetz/gruvbox | Gruvbox color scheme |
| petRUShka/vim-sage | SageMath syntax support |
| rhysd/vim-clang-format | Clang-format integration |
| rickhowe/diffchar.vim | Character-level diff highlighting |
| scrooloose/nerdtree | File system explorer |
| scrooloose/syntastic | Syntax checking |
| takac/vim-hardtime | Break bad Vim habits by discouraging repeated keys |
| tpope/vim-fugitive | Git wrapper for Vim |
| vim-airline/vim-airline | Lean & mean status/tabline |
| Plugin | Functionality |
|---|---|
| rebelot/kanagawa.nvim | Kanagawa color scheme |
| nvim-neo-tree/neo-tree.nvim | Modern file explorer |
| github/copilot.vim | GitHub Copilot AI pair programmer |
| robitx/gp.nvim | ChatGPT/Ollama integration |
| godlygeek/tabular | Text alignment and formatting |
| m4xshen/hardtime.nvim | Modern hardtime plugin |
| tpope/vim-fugitive | Git wrapper for Neovim |
| nvim-treesitter/nvim-treesitter | Advanced syntax highlighting and code understanding |
| lervag/vimtex | LaTeX support |
| majutsushi/tagbar | Display tags in a window |
| vim-airline/vim-airline | Status line |
| neovim/nvim-lspconfig | LSP configuration |
| williamboman/mason.nvim | LSP/DAP/linter/formatter package manager |
| karb94/neoscroll.nvim | Smooth scrolling |
| folke/which-key.nvim | Display available keybindings |
| lukas-reineke/indent-blankline.nvim | Indentation guides |
| nvim-telescope/telescope.nvim | Fuzzy finder |
<F4>- Generate ctags for current directory<F8>- Toggle Tagbar<C-n>- Toggle file tree (NERDTree in Vim / Neo-tree in Neovim)<leader>gw- Git write (stage current file)<leader>gr- Git read (checkout current file)<leader>gs- Git status<leader>gd- Git diff<leader>gc- Git commit
<F2>- Remove trailing whitespace and retab
Note: <leader> is the default backslash (\) — mapleader is not reassigned, so
<leader>ff means \ff.
<leader>ff- Telescope find files<leader>fg- Telescope live grep<leader>fb- Telescope buffers<leader>fh- Telescope help tags<leader>n- Toggle Neo-tree<leader>ln- Toggle relative line numbers<leader>?- Show buffer-local keymaps (which-key)<Esc>- Leave terminal mode
LSP bindings added by this config when a language server attaches:
gd- Go to definitiongD- Go to declarationgi- Go to implementation<C-k>- Signature help[d/]d- Previous / next diagnostic<space>e- Show diagnostic in a float<space>q- Diagnostics to location list
Rename, code actions and references are not remapped here — Neovim 0.11+ provides them out of the box, and redefining them only added a keystroke delay:
grn- Rename symbol (built-in)gra- Code actions (built-in)grr- Go to references (built-in)gri- Go to implementation (built-in)K- Show hover documentation (built-in)
- Line numbers enabled
- 80-column ruler
- Spell checking enabled
- Smart indentation (4 spaces)
- Syntax highlighting
- Git integration (vim-fugitive)
- Modern Lua-based configuration
- LSP support (clangd, lua_ls) via
vim.lsp.enable - Treesitter syntax highlighting and folding
- Telescope fuzzy finder
- ChatGPT/Ollama integration for AI assistance
- Lazy loading for the plugins that support it (neo-tree, telescope, tagbar, vimtex, gp.nvim, indent-blankline); colorscheme, treesitter, LSP and statusline load eagerly
- CUDA filetype detection for
*.cu/*.cuh(Neovim detects these itself) - Syntastic syntax checking
nvim/svndiff.sh and nvim/svnmerger.sh open SVN diffs and merges in Neovim.
install.sh symlinks them into ~/.config/nvim/, but SVN does not look there — you must
register them yourself in ~/.subversion/config:
[helpers]
diff-cmd = /home/<user>/.config/nvim/svndiff.sh
merge-tool-cmd = /home/<user>/.config/nvim/svnmerger.shNote: purge.sh / purge-nvim.sh delete ~/.config/nvim, which removes these
wrappers and leaves those paths dangling.
Neovim (init.lua): Restart Neovim; lazy.nvim auto-installs on first launch. Use
:Lazy to inspect plugin state.
Vim (vimrc): Run :PluginInstall inside Vim
- Ensure font cache is updated:
fc-cache -fv - Set your terminal to use the installed Nerd Font
- The font is downloaded by
install.sh
On Windows there is no font installer — download a Nerd Font manually and set it in your terminal. The SVN wrappers are shell scripts and are Linux/macOS only.
- Ensure clangd is installed:
sudo apt-get install clangd - For other languages, use
:Masonto install language servers, then add the server name to thevim.lsp.enable({ ... })call innvim/init.lua - Check that a server attached with
:checkhealth vim.lsp
Feel free to fork this repository and customize it for your needs. Pull requests for improvements are welcome!
See LICENSE file for details.