A single-file Neovim configuration built on Neovim's own built-ins — vim.pack
for plugins, vim.lsp.config/vim.lsp.enable for language servers, and
treesitter for highlighting and folds. No plugin manager, no module tree: the
whole config is one init.lua that reads top-to-bottom in load order.
Requires Neovim 0.11+ (developed on 0.12).
init.lua is ordered so that dependencies always precede their consumers:
| Section | Why it sits there |
|---|---|
OPTIONS |
termguicolors and background must precede the colorscheme |
PLUGINS |
vim.pack.add is synchronous; nothing below can require a plugin until it runs |
| colorscheme | catppuccin setup() → colorscheme |
KEYMAPS |
mapleader is set first — leader is resolved at definition time |
AUTOCMDS |
defines the shared augroup and the format-on-save allowlist |
PLUGIN CONFIGS |
mini.icons registers its devicons shim before nvim-tree/lualine |
LSP |
blink.cmp first, since servers pull capabilities from it |
TRANSPARENCY |
runs last so it wins over per-plugin highlight tweaks |
FLOATING TERMINAL |
no dependencies |
| File | Purpose |
|---|---|
init.lua |
the entire configuration |
nvim-pack-lock.json |
vim.pack lockfile — pins each plugin to a revision; written automatically, commit it to reproduce an exact plugin set |
.luarc.json |
declares the vim global for lua_ls |
.luacheckrc |
same for luacheck, plus hands line length to stylua |
Installed with vim.pack.add. Update with :lua vim.pack.update(), which
rewrites nvim-pack-lock.json.
| Plugin | Role |
|---|---|
| catppuccin | colorscheme (mocha), flavour = "auto" follows background |
| mini.nvim | ai, clue, comment, diff, git, surround, pairs, move, sessions, icons, notify, bufremove, indentscope, cursorword, trailspace |
| lualine.nvim | statusline, catppuccin-nvim theme |
| fzf-lua | files, grep, buffers, LSP pickers |
| nvim-tree.lua | file explorer |
nvim-treesitter (main) |
parsers, highlighting, folds |
| nvim-ts-context-commentstring | correct comments in embedded languages |
| nvim-lspconfig | server definitions |
| mason.nvim | installs servers, linters, formatters |
| efmls-configs-nvim | linter/formatter configs for efm |
blink.cmp (pinned 1.*) |
completion, snippets, signature help |
| rustaceanvim | Rust tooling on top of rust-analyzer |
| vim-tmux-navigator | unified window/pane movement |
mini.clue shows every mapping as you type a prefix, so the keymaps below are
discoverable in-editor — press <leader>, g, [, ], or <C-w>.
Leader is <Space>. Prefix groups: b buffers, c code, f find, g go-to,
h git hunks, R Rust, u UI toggles.
| Key | Action |
|---|---|
j / k |
wrap-aware down/up |
n / N, <C-d> / <C-u> |
centered search results / half-page scroll |
<A-j> / <A-k> |
move line or selection down/up |
< / > |
indent and reselect |
J |
join lines, keep cursor position |
<leader>/ |
clear search highlights |
<leader>p / <leader>x |
paste / delete without yanking |
<LeftRelease> |
mouse selection copies to system clipboard |
<leader>pa |
copy full file path |
| Key | Action |
|---|---|
<C-h/j/k/l> |
move between nvim splits and tmux panes |
<leader>¥ / <leader>- |
split vertical / horizontal (mirrors tmux) |
<C-Up/Down/Left/Right> |
resize window |
<leader>bn / <leader>bp |
next / previous buffer |
<leader>bd / <leader>bD |
delete buffer, keeping split layout / force |
<leader>bq |
close split, keep buffer |
<leader>e |
toggle file explorer |
<leader>t |
toggle floating terminal (<C-q> closes, <Esc> to normal mode) |
<leader>ff files · <leader>fg live grep · <leader>fb buffers ·
<leader>fh help tags · <leader>fx / <leader>fX document / workspace diagnostics
| Key | Action |
|---|---|
gd / <leader>gd |
go to definition (shadows Vim's local-declaration gd) |
<leader>gD / <leader>gS |
definition without picker / in a vsplit |
K |
hover documentation |
<leader>ca / <leader>cr |
code action / rename |
<leader>cf / <leader>co |
format buffer / organize imports |
<leader>cd / <leader>d |
diagnostics for line / under cursor |
<leader>nd / <leader>pd |
next / previous diagnostic |
<leader>q / <leader>ud |
diagnostic list / toggle diagnostics |
<leader>fr ft fs fw fi |
references, typedefs, document & workspace symbols, implementations |
]h / [h next / previous hunk · <leader>hs stage · <leader>hp diff overlay ·
<leader>hb blame
<leader>ca is overridden with :RustLsp codeAction, which renders
rust-analyzer's grouped code actions that the built-in picker drops.
<leader>Rr runnables · Rt testables · Re expand macro · RE explain error ·
RD render diagnostic · Rc Cargo.toml · Ro docs.rs · Rp parent module ·
Rj join lines · Rs syntax tree · Rh hover actions
Servers are registered with vim.lsp.config and started by vim.lsp.enable.
A server with no executable on PATH is skipped silently — check
:checkhealth vim.lsp.
:MasonInstall lua-language-server efm pyright ruff bash-language-server \
typescript-language-server gopls stylua luacheck prettierd eslint_d fixjson \
shellcheck shfmt cpplint clang-format revive gofumpt
Linting and formatting go through efm (efmls-configs); Rust is handled by
rustaceanvim, which starts rust-analyzer itself — do not also enable
rust_analyzer, or two clients will compete.
Format-on-save is deliberately restricted: it only runs when the attached client
is on an allowlist (efm, rust-analyzer), so a general-purpose server never
reformats a buffer unexpectedly. <leader>cf uses the same allowlist.
- treesitter tracks the
mainbranch, which compiles parsers locally and needs thetree-sitterCLI (brew install tree-sitter-cli) plus a C compiler. luacheckis a LuaRocks package — it needsbrew install luarocksbefore Mason can build it..luacheckrcdeclares thevimglobal.- blink.cmp is pinned to
1.*viavim.version.range("1.*")—vim.packneeds avim.VersionRangeobject here, not the bare"1.*"string that lazy.nvim accepts. v2 is a breaking rewrite that also needsblink.lib. - mini.icons is mocked as
nvim-web-devicons(mock_nvim_web_devicons()), so nvim-tree, lualine and fzf-lua get icons without that plugin installed. - Transparency merges rather than replaces highlights:
nvim_set_hlwould otherwise discard the colorscheme'sfgalong with the background. AColorSchemeautocmd re-applies it after a theme switch. - Terminal transparency has to be enabled in the terminal too; nvim only stops painting its own background.