A focused, batteries-included Neovim configuration built around the mini.nvim ecosystem with language server extras and ergonomic defaults. Use this README to get set up quickly and discover the main features.
- Back up any existing config:
mv ~/.config/nvim ~/.config/nvim.bak. - Clone this repository:
git clone <repo-url> ~/.config/nvim(or to$XDG_CONFIG_HOME/nvim). - Sync plugins headlessly:
nvim --headless "+Lazy! sync" +qa. - Run a health check:
nvim --headless "+checkhealth" +qa. - Launch Neovim normally and open a project to trigger language servers.
- Neovim 0.10+ with LuaJIT (treesitter folding and
vim.lsp.enableAPIs are used). - Git (
lazy.nvimbootstraps repositories on demand). - ripgrep (
Snacks.pickerlive grep flows andtodo-commentsuse it). - Language servers and formatters:
lua-language-server,basedpyright-langserver,ruff,yaml-language-server,taplo,rust-analyzer,nixd,nixfmt,jdtls(Rust checks usecargo clippy).
- init.lua – boots editor options, loads the plugin spec, and bootstraps the lazy.nvim manager.
- lua/config/ – shared options (
options.lua), terminal helpers, and general utilities. - lua/plugins/ – plugin spec (
spec.lua) and per-plugin configs underconfig/. - after/ – post-load hooks: keymaps, autocommands, and filetype-specific tweaks.
- lsp/ – per-server configurations consumed by
vim.lsp.enable.
- Leader key is
,and local leader is space for language-specific bindings. - Four-space indentation,
expandtab, relative line numbers, and persistent undo. catppuccin-mochacolorscheme with a dark background and smooth status/tab lines.- Treesitter-backed folding plus
inccommand=splitfor live substitution previews. - System clipboard integration via
unnamedplusand mouse-enabled split management. - Terminal buffers open in insert mode with a
<leader>otscratchpad.
- Navigation & Search –
Snacks.picker,reach.nvim,marks.nvim,mini.visits, andoil.nvimkeep buffers, marks, and files within a keystroke. - UI & Feedback –
catppuccin,mini.notify,nvim-ufo, andtodo-commentssurface structure, notifications, and folding hints. - Coding Aids –
nvim-cmp+cmp-nvim-lsp,nvim-treesitter,treesitter-context, andnvim_context_vtdrive completion and structural awareness. Cycle blink.cmp provider filters with<M-n>/<M-p>; a notification shows which sources are active because the popup itself can’t render a window title. - Snippets & Docs –
mini.snippets,friendly-snippets, andneogenaccelerate boilerplate, whilemarkview.nvim/markdown-preview.nvimpreview Markdown. - Integrations –
which-key,mini.sessions,mini.visits,mini.git,cord.nvim(Discord presence), andwindsurf.nvim(Codeium whenai_enabledis true) round out productivity.
<C-h>,<C-j>,<C-k>,<C-l>– move across splits (mirrors the same tmux bindings).-– open the parent directory insideoil.nvim; close it withqor open files like normal buffers.<leader>?– show which-key hints for buffer-local mappings;<leader>/shows every registered mapping.
<leader>sf,<leader>sb,<leader>sg,<leader>sG,<leader>s*– Snacks pickers for files, buffers, git grep, ripgrep, or the word under cursor.<leader>sr– resume the previous picker session;<leader>snshows the Snacks notification log.<leader>fk,<leader>fc,<leader>fs– Snacks pickers for keymaps, user commands, and spelling suggestions.
<leader>oo– toggle theaerialoutline;{/}move between symbols while focused there.<leader>jc– jump to the current Treesitter context node.<leader>tC– toggle the pinned Treesitter context window;<leader>tctoggles inline context virtual text.<leader>tp– enable or disable the globalmarkview.nvimMarkdown preview (mirrors the:Markviewcommand).
<M-n>,<M-p>– cycle blink.cmp provider filters. The completion popup can’t show the active provider group as a title, so watch the notifications for the current selection.
<leader>tD– enable/disable diagnostics globally.<leader>td– toggle diagnostic virtual text;<leader>tmswitches between focused scrolloff (huge) and the default.<leader>dl,<leader>dL,<leader>e– buffer diagnostics list, workspace diagnostics list, or a floating window for the cursor location.<C-/>– clear highlighted matches whenhlsearchis on.
<leader>ot– open a reusable 12-line terminal anchored to the bottom; terminal buffers always start in insert mode.<Esc><Esc>while in terminal mode leaves insert mode without reaching for<C-\><C-n>.<leader>rq(visual mode) – quote every argument except the first on each selected line, handy for shell-like commands.
These map automatically after a server attaches and only for the capabilities it advertises.
| Mode | Mapping | Action |
|---|---|---|
n |
gA |
Picker to attach/start a matching language server. |
n |
gD |
Picker to detach a client from the current buffer. |
n |
grd / grD |
Jump to definition or declaration. |
n |
K |
Hover documentation. |
n |
grC / grc |
Incoming or outgoing call hierarchy requests. |
n |
gra / gri |
Code actions or implementations. |
n |
grn / grr |
Rename symbols or list references. |
n |
grt |
Jump to the type definition. |
n |
grO / grs |
Document symbols or workspace symbols for the word under the cursor. |
i |
<C-s> |
Signature help popup. |
n |
glf |
Format the buffer with the active LSP. |
n |
<leader>e |
Open diagnostics in a floating window. |
n |
<leader>dl / <leader>dL |
Snacks pickers scoped to buffer or workspace diagnostics. |
- Auto attach –
after/ftplugin/*.luaenables servers (basedpyright,ruff,rust_analyzer,lua_ls,nixd,yamlls,taplo,jdtls) whenever the corresponding filetype loads and the executable exists. - Install tips – use your package manager or
pipforbasedpyright-langserverandruff, Nix flakes fornixd/nixfmt, installyaml-language-servervia npm or your distro (on NixOS preferpkgs.nodePackages.yaml-language-server), installtaplovia cargo/npm/binary releases (on NixOS preferpkgs.taploorpkgs.taplo-lsp), andjdtlswith Lombok support (the config looks forlombok.jarvia$JDTLS_LOMBOK,$LOMBOK_JAR, or jars shipped next to thejdtlsbinary/Mason install and warns if none are found). - YAML – relies on
yaml-language-server; if it is missing on NixOS, addpkgs.nodePackages.yaml-language-serverto the devShell or runnix profile install nixpkgs#nodePackages.yaml-language-serverfor a per-user install. - TOML – powered by
taplo; if it is missing on NixOS, addpkgs.taplo/pkgs.taplo-lspto your devShell or runnix profile install nixpkgs#taplo. - Rust – uses
rust-analyzer; if it is missing on NixOS, addpkgs.rust-analyzerto your flake/devShell packages or runnix profile install nixpkgs#rust-analyzerfor a user install.cargo clippypowers the default check command. - Commands –
:LspAttach,:LspDettach,:LspRestart,:LspInfo, and:LspLogmanage clients; attach/detach commands use picker UIs. - Formatting –
ruffformats Python on save, and a fallback format-on-save autocmd is injected when servers advertisetextDocument/formatting. - Customizing – tweak per-server settings in
lsp/*.lua; these tables are consumed directly byvim.lsp.enable.
- Automatic parser installation with
ensure_installedfor Lua, Vimdoc, Python, Java, and Bash. - Treesitter folding is enabled by default; disable per buffer with
:set nofoldenableif needed. treesitter-contextpins the current function/class at the top of the window with optional virtual text vianvim_context_vt.- Highlighted TODO/FIX/etc comments come from
todo-commentswith ripgrep-backed search.
- Terminals open in insert mode. Hit
<leader>otto spawn a reusable scratch pad and<Esc><Esc>to drop back to normal mode instantly. Snacks.pickerreplacesvim.ui.selectglobally, providing consistent fuzzy UIs for LSP pickers and user commands.- Diagnostics helpers (
<leader>dl,<leader>dL,<leader>e) rely on Snacks pickers to surface issues by scope.
| Command | Description |
|---|---|
:LspAttach / :LspDettach |
Picker flows to start or stop servers that match the current buffer filetype. |
:LspRestart |
Stops every attached client, restarts them with the same settings, and reattaches buffers automatically. |
:LspInfo / :LspLog |
Show :checkhealth vim.lsp output or open the LSP log in a split. |
:LspClangdSwitchSourceHeader |
With clangd attached, jump between header/source pairs. |
:LspClangdShowSymbolInfo |
With clangd attached, preview the symbol info returned by textDocument/symbolInfo. |
:NVRCVariables / :NVRCEdit / :NVRCApply |
Inspect, edit, and reapply .nvimrc.ini overrides such as ai_enabled or colorscheme. |
:Oil |
Launch the Oil buffer-based file manager (also bound to the - keymap). |
:AerialToggle! |
Toggle the outline sidebar that <leader>oo controls. |
:Markview |
Toggle the Markdown preview window globally; use <leader>tp for the paired keymap. |
:MarkdownPreviewToggle |
Open or close the browser preview from markdown-preview.nvim. |
:Neogen |
Generate docstrings/snippets for the current function/class using language-aware templates. |
init.luabootstrapslazy.nvimautomatically and then loadslua/plugins/spec.lua.- Keep plugin-specific settings in
lua/plugins/config/; shared helpers live underlua/config/. - Run
nvim --headless "+Lazy! sync" +qa(or:Lazy syncinteractively) whenever you change the spec. lazy-lock.jsonpins plugin commits; commit it alongside spec changes so checkouts stay reproducible.
- Run
nvim --headless "+checkhealth" +qaafter adding plugins or language servers to confirm integrations. - Set
NVIM_LOG_LEVEL=DEBUGbefore launching Neovim to enable verbose logging throughlua/utils.lua. - Use
:messagesand:LspLogto inspect errors; most plugin setups emit log lines viautils.log_*. - If a plugin misbehaves, temporarily disable it in
lua/plugins/spec.lua, run:Lazy sync, and restart Neovim.
- Drop a
.nvimrc.inifile in your project root to override globals (e.g.,ai_enabled,autoformat_on_save_enabled,colorscheme). Use:NVRCEdit,:NVRCApply, and:NVRCVariablesto manage overrides without restarting Neovim. :help onjinloads the generated help doc fromdoc/onjin.txt. Regenerate it after README edits withpanvimdoc --project-name onjin --input-file doc/onjin.md --output-file doc/onjin.txt.- After regenerating
doc/onjin.txt, run:helptags ~/.config/nvim/doc(or:helptags ALL) so Neovim updates its help index and:help onjinresolves correctly.
Happy hacking!