A comprehensive Neovim configuration featuring built-in LSP, AI assistance, and modern development tools.
This configuration is tailored for my personal use. Rather than directly copying it, I encourage you to use it as inspiration to understand plugin ecosystems, dependency management, and configuration organization patterns for your own setup.
Fast, batteries‑included, opinionated — but intentionally easy to fork & trim.
- 🧠 AI Integration: CodeCompanion, Claude Code, GitHub Copilot (MCP aware), extensible system prompts.
- 🔧 Fully Managed LSP: Mason driven install/update, sensible defaults, per‑language overrides.
- ✏️ Smart Editing: Blink.cmp, snippets, autopairs, surround, multi‑cursor, structural text objects.
- 🎯 Navigation & Code Intelligence: Treesitter, symbols outline, peek & preview, intelligent folding.
- 🐛 First‑Class Debugging: nvim-dap + UI, persistent breakpoints, inline virtual text, Go / JS / Python helpers.
- 🔍 Search & Fuzzy Workflow: Telescope (files, live grep, frecency, symbols), ripgrep & fd integration.
- 📁 File & Project Ops: NvimTree (floating / preview), project root detection, recent & pinned files.
- 📊 Database Toolkit: SQL client + completion + UI integration.
- 🎨 Modern UI: Catppuccin theme, animated statusline, notifications, command palette, snacks.
- 🌀 Git & Collaboration: Gitsigns, Fugitive, Neogit, Lazygit integration, diff & blame helpers.
- 🧩 Extensible Plugin Layout: Clear module boundaries, lazy loading patterns, override hooks.
- 🚀 Performance Focus: Aggressive lazy spec, startup profiling helpers, cache & GC tuning.
- 🛡️ Safe Defaults: Opinionated keymaps, guarded autocmds, defensive plugin loading.
- Neovim
>= 0.10.0(required for all features) - Git
>= 2.19.0(for plugin management and version control) - A Nerd Font (recommended: JetBrainsMono Nerd Font for icons and symbols)
# Unix-like systems (Linux/macOS)
git clone https://github.com/jinzhongjia/neovim-config.git ~/.config/nvim
# Windows
git clone https://github.com/jinzhongjia/neovim-config.git ~/AppData/Local/nvim# clone
git clone https://github.com/jinzhongjia/neovim-config.git ~/.config/nvim
cd ~/.config/nvim
# first open (downloads plugins)
nvim
# inside Neovim (after install finishes)
:Mason # install language servers / linters / formatters
:checkhealth # verify environment
# optional helpers
:Lazy update # keep plugins fresh- Open Neovim and wait for Lazy.nvim to install all plugins automatically
- Run
:checkhealthto verify your environment - Run
:Masonto install LSP servers, formatters, and linters - Restart Neovim to ensure all configurations are loaded
Installing bat and delta significantly enhances file preview and Git diff visualization.
Windows (using scoop):
scoop install bat deltamacOS:
brew install bat git-deltaLinux:
# Ubuntu/Debian
sudo apt install bat
cargo install git-delta
# Arch Linux
sudo pacman -S bat git-deltaAfter installation, configure Git to use delta:
# Set delta as git pager
git config --global core.pager "delta"
# Set interactive diff filter
git config --global interactive.diffFilter "delta --color-only"
# Enable navigation
git config --global delta.navigate "true"
# Enable line numbers
git config --global delta.line-numbers "true"
# Use standard diff mode (not side-by-side)
git config --global delta.side-by-side "false"
# Enhance merge conflict display
git config --global merge.conflictstyle "diff3"
# Enable moved code detection
git config --global diff.colorMoved "default"After configuration:
- File previews in fzf-lua (
<C-p>) will show syntax highlighting (via bat) - Git status in fzf-lua (
<leader>tgs) will display beautiful diffs (via delta) - Command-line Git operations (
git diff,git log -p,git show) will automatically use delta
- git
>= 2.19.0- Version control and plugin management - ripgrep
>= 13.0.0- Fast text search (required for Telescope and search features) - fd
>= 8.0.0- Fast file finder (improves Telescope performance) - curl or wget - HTTP client for downloading tools
- cmake
>= 3.10- Build system for native extensions - make - Build automation
- gcc or clang - C compiler for Treesitter parsers
- unzip - Archive extraction for Mason packages
- Node.js
>= 18.0.0& npm - JavaScript/TypeScript development- Required for many LSP servers and tools
- Python
>= 3.8& pip - Python development- Required for some formatters and linters
- Go
>= 1.20- Go development- Required for Go LSP and tools
- Rust & cargo - Rust development
- Required for Rust analyzer and some tools
- Zig
>= 0.11.0- Zig language support - .NET SDK
>= 6.0- C# development - Java
>= 11- Java development (for Java LSP) - Lua
>= 5.1- Lua development
- Lazygit - Terminal UI for Git (integrated with Neovim)
- Lazydocker - Terminal UI for Docker
- MCP Hub - Model Context Protocol server support
- GitHub CLI (
gh) - GitHub integration - jq - JSON processor (for some plugins)
- bat - Syntax highlighting for file previews (enhances fzf-lua)
- delta - Beautiful Git diff viewer
- Compilation toolchain (gcc/clang, make, cmake) for building native extensions & Treesitter
- unzip / tar utilities for extracting packages
- SSL development libs (e.g. libssl) if certain tools require HTTPS features
Note: The configuration auto-detects and configures settings for these GUI clients.
This configuration includes 100+ carefully selected plugins. Key highlights:
- Plugin Manager: Lazy.nvim for fast, lazy-loaded plugin management
- Completion: Blink.cmp with AI-powered suggestions
- LSP: Native LSP with Mason for automatic server installation
- AI Integration: CodeCompanion, Claude Code, and GitHub Copilot
- File Navigation: Telescope, NvimTree, and enhanced search tools
- Git Integration: Fugitive, Gitsigns, Neogit, and Lazygit
- UI Enhancements: Catppuccin theme, Lualine statusline, and Snacks.nvim
- Debugging: nvim-dap with UI and language-specific adapters
For a complete list, see plugin_list.md.
After installation, run :checkhealth to diagnose any issues with:
- Neovim version and features
- Required dependencies
- Plugin installations
- LSP server status
All LSP servers and development tools are managed through Mason:
:Mason- Open Mason UI to install/update tools:LspInfo- Check active language servers for current buffer:ConformInfo- Verify formatter configuration:LinterInfo- Check linter status
<leader>- Space key (leader key)<leader>e- Toggle file explorer (NvimTree)<leader>w- Save file<leader>q- Quit
<leader>ff- Find files (Telescope)<leader>fg- Live grep in files<leader>fb- Browse open buffers<leader>fh- Search help tags<leader>fr- Recent files (frecency)<leader>fs- Search symbols
<leader>cc- Toggle CodeCompanion chat<leader>ac- Toggle Claude Code<leader>af- Focus Claude Code window<leader>ar- Resume Claude Code session
<leader>ca- Code actions<leader>cf- Format code<leader>cr- Rename symbolgd- Go to definitiongr- Find referencesK- Hover documentation
<leader>xx- Trouble diagnostics[d- Previous diagnostic]d- Next diagnostic
<leader>gg- Lazygit<leader>gd- Git diff view<leader>gb- Git blame
Directory layout (core parts only):
lua/
core/ -> options, autocmds, keymaps
plugins/ -> lazy.nvim specs (grouped by domain)
lsp/ -> server setups, capabilities, on_attach
ui/ -> theme & statusline helpers
Recommended ways to extend:
- Create
lua/custom/and add your own lazy specs (auto‑loaded if you require them ininit.lua). - Override plugin opts using lazy's
opts = function(_, opts) ... endpattern in a new spec with samename. - Disable what you do not need:
return {
{ "nvim-neo-tree/neo-tree.nvim", enabled = false },
}- Add per‑language tweaks in
after/ftplugin/<filetype>.lua.
Minimal bootstrap example (if you want to start trimming):
-- init.lua
require("core").setup()
require("lazy").setup({
{ import = "plugins.core" },
{ import = "plugins.lsp" },
})Q: Plugins stuck on first install?
A: Check network / proxy, then run :Lazy sync or delete lazy-lock.json and reopen.
Q: LSP server not attaching?
A: Run :LspInfo to see status, ensure tool installed in :Mason, check filetype detection via :set ft?.
Q: Formatting not working?
A: Run :ConformInfo, confirm formatter installed, ensure no conflicting formatter running (e.g. null-ls remnants).
Q: High CPU / lag?
A: Use :Lazy profile to inspect startup cost; temporarily disable heavy UI plugins to isolate.
Q: AI popup noisy?
A: Toggle / scope suggestions with provided AI keymaps or disable corresponding spec.
Common commands cheat:
:Lazy sync # install/clean plugins
:Lazy profile # measure startup
:Mason # manage external tools
:LspInfo # active servers
:checkhealth # diagnostics
- Remove languages you do not use from Treesitter & Mason ensure lists.
- Disable large providers:
vim.g.loaded_perl_provider = 0, etc. (already handled, keep if trimming). - Use ripgrep + fd (already leveraged) for fastest Telescope experience.
- Run
:Lazy restoreif lockfile drift causes slow cold startups. - Consider pinning fewer plugins or pruning UI niceties for headless / remote sessions.
Personal configuration shared for learning. Feel free to copy excerpts with attribution; avoid filing broad feature requests unless you contribute a PR.




