A personal Neovim configuration written in Lua and built on top of Neovim's
native vim.pack plugin manager (Neovim 0.12+) plus a curated set of plugins
for a modern and efficient development experience.
- Plugin Manager: Uses Neovim's built-in
vim.pack for fast startup and
dependency-free plugin management (no external manager required).
- Lazy Loading: Non-essential plugins are scheduled after
VimEnter to
keep startup time minimal.
- Editing Features: Autocompletion (blink.cmp), snippets, auto-pairing,
surrounding, improved text objects, and yank history/cycling.
- LSP: Full LSP support via
nvim-lspconfig (using the new
vim.lsp.enable API) for diagnostics, code actions, hover, rename, and
more.
- Formatting: Automatic formatting on save and on demand with
conform.nvim.
- File Navigation: Edit the filesystem like a buffer with
oil.nvim, and
fuzzy-find everything with fzf-lua.
- Git Integration: Inline git signs, hunk staging/resetting, and blame via
gitsigns.nvim.
- Custom Statusline: A hand-written, dependency-free statusline
(
lua/plugins/status.lua) showing mode, git state, diagnostics, filetype,
and cursor position.
- Treesitter: Auto-installs parsers for newly opened file types and starts
highlighting for each buffer. Function and class text objects (
aF/iF,
ac/ic) come from nvim-treesitter-textobjects through mini.ai.
- Markdown & Images: In-buffer markdown rendering (
render-markdown.nvim)
and inline images through the kitty graphics protocol (snacks.image),
working inside tmux and over SSH.
- Clipboard:
unnamedplus everywhere. With no clipboard tool (SSH, no
display) copy goes through OSC 52; paste returns the last copy and never
queries the terminal.
- Tools: Floating lazygit and terminal (
snacks.nvim) and key hints
(mini.clue).
nvim/
├── init.lua -- Entry point: enables loader and requires modules
├── lua/
│ ├── options.lua -- Core editor options and diagnostics
│ ├── keymaps.lua -- Global keymaps
│ ├── autocmds.lua -- Autocmds (relative numbers, auto-save, yank highlight)
│ ├── packages.lua -- vim.pack bootstrap and plugin entry points
│ └── plugins/
│ ├── alpha.lua -- Dashboard / startup screen
│ ├── clue.lua -- Key hints (mini.clue)
│ ├── completions.lua -- blink.cmp, mini.nvim modules, gitsigns, noice
│ ├── fzf.lua -- fzf-lua fuzzy finder and pickers
│ ├── lang.lua -- LSP config and conform.nvim formatting
│ ├── markdown.lua -- render-markdown.nvim
│ ├── misc.lua -- vimtex
│ ├── snacks.lua -- Lazygit and floating terminal keymaps
│ ├── status.lua -- Custom hand-written statusline
│ ├── theme.lua -- Colorscheme (nord) and transparent backgrounds
│ ├── treesitter.lua -- Treesitter config and auto-install
│ └── yanky.lua -- Yank history, snacks.nvim setup (picker, image)
└── nvim-pack-lock.json -- Locked plugin revisions for vim.pack
Before you begin, ensure you have the following external dependencies installed:
- Neovim (v0.12.0 or newer — required for
vim.pack, vim.lsp.enable, and vim.loader)
- Git
- fzf (fuzzy finder backend for
fzf-lua)
- ripgrep (for
fzf-lua live grep)
- fd (for
fzf-lua file finding)
- A Nerd Font (for icons)
- tree-sitter CLI (used by
nvim-treesitter to build parsers; a C compiler such as gcc/clang may also be required to compile them)
- ImageMagick (
magick, converts non-PNG images for inline display)
- lazygit (for
<leader>gg)
- Clone this repository to your Neovim configuration directory (e.g.,
~/.config/nvim):
git clone https://github.com/mathaimp/nvim.git ~/.config/nvim
- Start Neovim.
vim.pack will automatically clone the required plugins on
first launch.
- (Optional) Update all plugins to their latest locked/pinned revisions:
- Manually install your language servers and formatters. This config does
not use an auto-installer (no
mason.nvim). Install the tools you need on
your system, e.g.:
- Language servers (
lua_ls, ty, ruff, rust-analyzer, nixd) — configured
in lua/plugins/lang.lua.
- Formatters (
stylua, ruff, nixfmt) — configured in
lua/plugins/lang.lua.
| Plugin |
Description |
vim.pack (Neovim built-in) |
Native plugin manager introduced in Neovim 0.12; no external manager needed |
| Plugin |
Description |
| echasnovski/mini.nvim |
mini.pairs, mini.ai, mini.surround, mini.jump, mini.files, mini.clue |
| gbprod/yanky.nvim |
Improved yank/put with history and cycling |
nvim.undotree (packadd) |
Visualize and browse the undo history |
Configured language servers (vim.lsp.enable): lua_ls, ty,
ruff, rust_analyzer, nixd. ruff provides lint diagnostics and fixes; ty
provides hover and type checking.
Configured formatters: stylua (Lua), ruff_format (Python), nixfmt
(Nix); falls back to LSP formatting when no formatter is set.
<Space> is the leader. Pause after it (or after g, z, <C-w>) and
mini.clue shows what is available.
| Keys |
Action |
- |
Open parent directory (oil) |
<leader>e / <leader>E |
mini.files at current file / working directory |
<leader>ff / fF |
Find files (project / including ignored) |
<leader>fg / fG |
Live grep (project / including ignored) |
<leader>fb, fr, fR, fh |
Buffers, recent files (cwd / all), help |
gd, gr, gi, gt |
LSP definitions, references, implementations, type definitions (fzf-lua) |
<leader>fs / fS, fd / fD |
Document / workspace symbols and diagnostics |
K, <leader>rn, <leader>ca |
Hover, rename, code action |
[d / ]d |
Previous / next diagnostic |
<leader>cf |
Format buffer |
]h / [h, <leader>hs, hr, hp, hb |
Git hunks: navigate, stage, reset, preview, blame |
<leader>gg, gl, gf |
Lazygit, log, current file history |
<leader>tt or <M-t> |
Toggle floating terminal |
<leader>y, <C-p> / <C-n> |
Yank history, cycle pastes |
<leader>u |
Undo tree |
<leader>b |
Alternate buffer |
<leader>pu / pr |
Update / remove plugins |
aF/iF, ac/ic |
Function and class text objects |