| lua | ||
| init.lua | ||
| lazy-lock.json | ||
| README.md | ||
Neovim Configuration
Portable Neovim configuration using lazy.nvim, Mason-managed tooling, native LSP, Treesitter, Telescope, and DAP (Neovim 0.11+, tested on 0.12.1).
Installation
Standalone (any system)
git clone git@github.com:itme-brain/nvim.git ~/.config/nvim
As part of NixOS config
git clone --recurse-submodules git@github.com:itme-brain/nixos.git
Features
- Native LSP (
vim.lsp.config/vim.lsp.enable) - no manual server list needed - Smart LSP picker (
<leader>css) - auto-detects installed servers for current filetype - Neovim 0.12 compatible - uses built-in
:lspcommands and keeps legacy:Lsp*aliases working - Portable - Mason is the source of truth for LSP servers, debug adapters, and tree-sitter-cli
- Treesitter - starts via Neovim's native
vim.treesitter.start - Debugging - lazy-loaded
nvim-dapstack with Mason-managed adapters
LSP Setup
Mason installs the shared LSP baseline on every system:
lua_ls- Lua/Neovimnil_ls- Nixbashls- Bash/Shelljsonls- JSONhtml- HTMLcssls- CSSmarksman- Markdowntaplo- TOMLyamlls- YAML
On NixOS, Mason-installed binaries require nix-ld so downloaded tools can execute. The NixOS module should provide nix-ld; Neovim itself does not keep a separate Nix-only LSP package list.
The smart picker (<leader>css) scans all lspconfig servers and shows only those with binaries installed.
On Neovim 0.12+, start/stop/restart uses the built-in :lsp commands under the hood.
Treesitter
Treesitter uses the current nvim-treesitter main branch API:
- Parsers are installed with
nvim-treesitter - Highlighting starts through
vim.treesitter.start tree-sitter-cliis bootstrapped through Mason when needed for parser installs/updates
Debugging
Debugging uses nvim-dap, nvim-dap-ui, nvim-dap-virtual-text, telescope-dap.nvim, and mason-nvim-dap.nvim.
The DAP stack is lazy-loaded. Normal startup does not load DAP; it loads only when a :Dap... command runs or a <leader>d... mapping is used.
Mason installs:
debugpy- Pythoncodelldb- C/C++/Rustbash-debug-adapter- Bashjs-debug-adapter- JavaScript/TypeScript
Key Bindings
| Key | Action |
|---|---|
<leader>css |
Start LSP (smart picker) |
<leader>csx |
Stop LSP |
<leader>csr |
Restart LSP |
<leader>cf |
Format code |
<leader>ca |
Code action |
<leader>cr |
Rename symbol |
gd |
Go to definition |
<leader>gr |
Find references |
<leader>e |
Toggle file explorer |
<leader>bd |
Delete buffer |
<leader>/ |
Live grep from git root |
<leader>ff |
Find files from git root |
<leader>db |
Toggle breakpoint |
<leader>dB |
Set conditional breakpoint |
<leader>dc |
Continue debugging |
<leader>di |
Step into |
<leader>do |
Step over |
<leader>dO |
Step out |
<leader>du |
Toggle debug UI |
<leader>dt |
Terminate debug session |
<leader>de |
Evaluate expression |
<leader>ds |
Debug configurations |
<leader>dS |
Debug breakpoints |
Plugins
- lazy.nvim - plugin manager
- nvim-lspconfig - LSP configurations
- nvim-cmp - completion
- telescope.nvim - fuzzy finder
- nvim-treesitter - syntax highlighting
- nvim-dap - debug adapter client
- nvim-dap-ui - debugging UI panes
- mason-nvim-dap.nvim - Mason debug adapter integration
- neo-tree.nvim - file explorer
- gitsigns.nvim - git integration
- lualine.nvim - statusline
- bufferline.nvim - buffer tabs
- which-key.nvim - keybinding hints