- Lua 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| docs | ||
| lua | ||
| .gitignore | ||
| .stylua.toml | ||
| CLAUDE.md | ||
| init.lua | ||
| keybindings.pdf | ||
| lazy-lock.json | ||
| README.md | ||
nvim-config
A modular Neovim configuration built on lazy.nvim with a template-based LSP architecture for Neovim 0.12+.
Features
- Modular LSP System: Template-based language modules with automatic tool installation
- Native LSP API: Uses Neovim 0.11+ native LSP configuration (no lspconfig dependency)
- Automatic Tool Management: Mason auto-installs LSP servers, formatters, linters, and debuggers
- Smart Completion: Fast autocompletion with blink.cmp
- Integrated Debugging: nvim-dap with pre-configured adapters per language
- Testing Support: neotest with language-specific test adapters
- Modern UI: Telescope, neo-tree, which-key, and lualine for a polished experience
Requirements
- Neovim 0.12+ (uses native LSP configuration API)
- Git
- A Nerd Font (for icons)
- ripgrep (for Telescope live grep)
- Node.js (for some LSP servers)
Installation
-
Backup your existing Neovim configuration:
mv ~/.config/nvim ~/.config/nvim.backup mv ~/.local/share/nvim ~/.local/share/nvim.backup -
Clone this repository:
git clone <your-repo-url> ~/.config/nvim -
Start Neovim:
nvim -
Lazy.nvim will automatically install plugins, and Mason will install all configured language tools.
Project Structure
~/.config/nvim/
├── init.lua # Entry point: loads config and lsp modules
├── lua/
│ ├── config/
│ │ ├── init.lua # Loads settings, keymaps, autocmds, then plugins
│ │ ├── settings.lua # Vim options and global settings
│ │ ├── keymaps.lua # Global and plugin-specific keybindings
│ │ └── plugins/ # Plugin definitions (one per file)
│ │ ├── init.lua # Lazy.nvim setup
│ │ ├── lsp.lua # Blink.cmp, lazydev, mason, conform
│ │ ├── lint.lua # nvim-lint configuration
│ │ ├── debug.lua # nvim-dap configuration
│ │ ├── test.lua # neotest configuration
│ │ ├── test-adapters.lua # neotest-vstest
│ │ ├── dotnet.lua # .NET tooling (easy-dotnet.nvim)
│ │ ├── telescope.lua # Fuzzy finder
│ │ ├── treesitter.lua # Syntax highlighting
│ │ ├── theme.lua # Colorscheme
│ │ ├── which-key.lua # Keybinding hints
│ │ ├── neotree.lua # File explorer
│ │ ├── lualine.lua # Status line
│ │ ├── mini.lua # Text objects & surround
│ │ ├── autopairs.lua # Auto-close brackets
│ │ ├── indent.lua # Indentation guides
│ │ ├── diffview.lua # Git diff UI
│ │ ├── gitsigns.lua # Inline git signs
│ │ └── render-markdown.lua # Markdown rendering
│ └── lsp/
│ ├── init.lua # LSP orchestration: loads language modules
│ ├── handlers.lua # Shared LSP on_attach, capabilities, diagnostics
│ └── languages/ # Language-specific modules
│ ├── _template.lua # Template for adding new languages
│ ├── lua.lua
│ ├── bash.lua
│ ├── markdown.lua
│ ├── nix.lua
│ ├── dotnet.lua # .NET module (C#/F#/VB)
│ └── rust/ # Rust module (directory)
│ ├── init.lua # Main Rust module definition
│ ├── build_manager.lua
│ ├── cargo_finder.lua
│ ├── debug_launcher.lua
│ ├── package_parser.lua
│ └── telescope_pickers.lua
└── CLAUDE.md # Development guidelines for Claude Code
Language Support
Currently Enabled
- Lua: lua-language-server, stylua
- C#/F#/VB (.NET): Roslyn LSP (via easy-dotnet.nvim), csharpier, netcoredbg
- Bash: bash-language-server, shfmt, shellcheck, bash-debug-adapter
- Markdown: marksman, markdownlint
- Nix: rnix-lsp, nixfmt
- Rust: rust-analyzer, codelldb
Adding a New Language
-
Copy the template:
cp lua/lsp/languages/_template.lua lua/lsp/languages/your_language.lua -
Fill in the module fields:
tools: Mason packages (LSP server, formatter, linter, DAP)filetype: Vim filetypelsp: Server name and settingsformatters: List for conform.nvimlinters: List for nvim-lintdap: DAP adapter configuration (optional)test(): Function returning neotest adapter (optional)
-
Implement the
setup()function following the pattern in the template -
Register the language: add to
base_languagesinlua/lsp/init.luafor always-on loading, or use theNVIM_LANGSenv var for opt-in loading
Key Plugins
Core
- lazy.nvim: Plugin manager
- nvim-treesitter: Syntax highlighting and code understanding
LSP & Completion
- blink.cmp: Fast autocompletion engine
- lazydev.nvim: Lua development with proper vim.* completion
- easy-dotnet.nvim: C# .NET development tooling
- mason.nvim: Tool installer
- mason-tool-installer.nvim: Automatic tool installation
Code Quality
- conform.nvim: Code formatting
- nvim-lint: Linting
Debugging & Testing
- nvim-dap: Debug Adapter Protocol client
- neotest: Testing framework
Git
- diffview.nvim: Git diff and file history UI
- gitsigns.nvim: Inline git signs, hunk staging/resetting
UI & Navigation
- telescope.nvim: Fuzzy finder
- neo-tree.nvim: File explorer
- which-key.nvim: Keybinding hints
- lualine.nvim: Statusline
- render-markdown.nvim: Markdown rendering in buffer
- oxocarbon: Color scheme
Utilities
- LuaSnip: Snippet engine
- mini.nvim: Collection of utilities (ai textobjects, surround, etc.)
- nvim-autopairs: Auto-close brackets
- guess-indent.nvim: Auto-detect indentation
Essential Keybindings
See lua/config/keymaps.lua for the complete reference.
LSP (defined in lsp/handlers.lua)
gra- Code actionsgrn- Rename symbolgrr- Find referencesgrd- Go to definitiongrD- Go to declarationgri- Go to implementationgrt- Go to type definitiongO- Document symbolsgW- Workspace symbols<leader>th- Toggle inlay hints
Navigation
<C-h/j/k/l>- Navigate windows[d/]d- Previous/next diagnostic[q/]q- Previous/next quickfixgl- Show diagnostic float
Files & Search
<leader>e- Toggle file tree<leader>sf- Search files<leader>sg- Live grep<leader><leader>- Search buffers<leader>sh- Search help
Code
<leader>f- Format buffer
Testing
<leader>tt- Test nearest<leader>tf- Test file<leader>td- Debug test<leader>ts- Test summary
Debugging
<F5>- Start/Continue<F9>- Step out<F10>- Step over<F11>- Step into<F7>- Toggle debug UI<F4>- Stop debugging<leader>b- Toggle breakpoint<leader>B- Conditional breakpoint
Customization
Changing Settings
Edit lua/config/settings.lua for Vim options (tabstop, line numbers, etc.)
Adding/Removing Plugins
Add files to lua/config/plugins/ following the lazy.nvim spec format
Modifying Keybindings
Edit lua/config/keymaps.lua - plugin-specific keymaps use autocmds for lazy loading
Enabling/Disabling Languages
Add to base_languages in lua/lsp/init.lua for always-on loading, or set the NVIM_LANGS env var (e.g. in .envrc) for opt-in loading per project.
Development
Formatting
All Lua files use 2-space indentation. Run :lua vim.lsp.buf.format() or <leader>f to format.
Plugin Management
:Lazy- View plugin status:Lazy update- Update all plugins:Lazy sync- Install missing and remove unused plugins
Tool Management
:Mason- View installed tools- Tools are auto-installed based on enabled language modules
License
Personal configuration - use as you wish.