nvim

My minimal clean fast Neovim config ๐Ÿ’š ~10+ plugins of pure joy. (Project migrated from github/tduyng/nvim) https://tduyng.com/series/neovim/

Active Pure Nim score 67/100 ยท last commit 2026-11-16 ยท 11 stars ยท tests present ยท no docs generated

Summary

Latest Version Unknown
License Unknown
CI Status Failing
Stars 11
Forks 3
Open Issues 0
Last Commit 2026-11-16
Downloads 0
Last Indexed 2026-11-23 09:07

Installation

nimble install nvim
choosenim install nvim
git clone https://gitlab.com/tduyng/nvim

OS Compatibility

Platform Linux macOS Windows FreeBSD OpenBSD NetBSD Android iOS WASM Embedded
nvim โœ“ โœ“ โœ“ - - - - - - -

Source

Repository https://gitlab.com/tduyng/nvim
Homepage https://gitlab.com/tduyng/nvim
Registry Source gitlab

README

My Neovim config

Fast, IDE-grade Neovim setup with 13 plugins using native vim.pack (no plugin manager needed)

Neovim Plugins

  • Uses native vim.pack (no lazy.nvim/packer overhead)
  • Custom UI components (statusline, tabline, session manager) without extra plugins
  • 15+ LSP servers pre-configured, one formatter per project through conform.nvim
  • Session persistence that restores your workspace as VSCode
  • One long lived nvim per project, hopping between them in one terminal

Core Plugins

Plugin Purpose
blink.cmp Completion with LSP, snippets, fuzzy matching
conform.nvim Format on save, picking prettier, biome, bun fmt or oxfmt per project
fff.nvim File finder and live grep picker
gitsigns.nvim Git signs in the gutter, hunk navigation, line blame
grug-far.nvim Search & replace across files
nvim-dap (optional) Debug Adapter Protocol client
nvim-dap-view (optional) DAP UI panel (scopes, breakpoints, watches, threads)
nvim-treesitter Syntax highlighting, code folding, indentation
nvim-web-devicons File type icons
oil.nvim File explorer
vdiff.nvim Side-by-side diff viewer, merge conflict resolution, gitlab/github review
which-key.nvim Command palette & keybind helper
yanky.nvim Yank ring with cycling, history picker, put highlighting

Minimal custom features (no plugins required)

Feature File Description
Custom Catppuccin config/theme.lua Gruvbox-inspired palette, highlight overrides for plugins, syntax, treesitter, LSP semantic tokens
Auto-pairs config/pairs.lua Insert-mode auto-close for brackets, and smart backspace
Statusline config/statusline.lua Git branch/diff, LSP diagnostics, word count for markdown
Tabline config/tabline.lua Smart buffer management with devicons
Session manager config/session.lua Per-directory auto-save/restore, :Session (restore), save and list picker
LSP utilities config/lsp.lua Unified 15+ server setup, inlay hints, relative auto-imports end in .js
TypeScript config/typescript.lua The settings both TypeScript servers share, so the two lsp/ files cannot drift apart
Diagnostics config/diagnostics.lua Custom diagnostic display config
Pack UI config/pack.lua Browser for vim.pack plugin registry
Picker config/picker.lua Floating list with filter and live preview, also the vim.ui.select backend
Picker lists config/lists.lua Marks, jumps, registers, quickfix, commands, autocmds and history as previewable pickers
Jump config/jump.lua Minimal 2-char search with label jump
Multicursor config/mcursor.lua Column-align native multicursors (:h multicursor), keymap g<Space>
UI overrides config/ui2.lua Native ui2 message layer, with a pager that fills the window
Markdown render config/markdown.lua In-buffer markdown rendering (headings, code, lists, tables, callouts), image preview, mo
File tree config/tree.lua Sidebar tree that reveals the current file, hides gitignored paths, devicons, h/l fold, <CR> opens
Test runner config/runner.lua Nearest test, file, last run and a project check, failures into quickfix and diagnostics
Secret cloak config/cloak.lua Masks secret values on screen without touching the file, per file glob, <leader>ue
Buffer close config/buffer.lua Close buffers without breaking the layout, one confirmation for a batch of unsaved ones

What the runtime already does

The config asks nvim for what nvim has, so the code stays small:

  • 'autoread' has its own file watchers, so nothing calls :checktime on focus.
  • ui2 is enabled with one change, a pager that fills the window. Every other messagesopt item and height is already the default.
  • config/options.lua holds only what differs from a nvim --clean start, and each plugin setup only what its plugin does not default.
  • vim.iter, vim.list_slice, vim.glob and nvim_set_hl replace hand-rolled versions of themselves.

I also wrote a series of articles about my Neovim config

Installation

# Backup existing config
mv ~/.config/nvim ~/.config/nvim.bak

# Clone
git clone https://gitlab.com/tduyng/nvim.git ~/.config/nvim

# Launch (plugins install automatically)
nvim

Prerequisites: Neovim 0.12+, Git, Ripgrep, Nerd Font. The config is run on 0.12.4, and the two places 0.13 changes an answer (treesitter queries, the message layer) branch on has("nvim-0.13") or load the module both versions have.

Update plugins: <leader>pu or :lua vim.pack.update()

Development

Validate the config before committing:

just validate  # Run all checks (loads config in headless nvim + checks formatting)
just check     # Test config loads without errors
just fmt       # Format all Lua files with StyLua
just test      # Run every suite in tests/ and luacheck over lua/

just test is the gate: one file in tests/ per feature, each driven through the real config.

A failing suite runs on its own with just test-<name> (just test-picker). tests/lib.sh fails a suite when nvim reports a Lua error, because nvim -c lua exits 0 on one and a suite that never reached its checks would otherwise pass. It also points $XDG_CONFIG_HOME at this checkout, so a suite loads the code it is testing rather than the installed copy of an older build.

Quick Start

Leader key: Space

Essential keybindings

Motions
  gh                First non-blank of the line
  gl                End of the line
  ==                Select the whole buffer

Files & Search
  <leader>ff        Find files (fff.nvim)
  <leader>fg        Live grep (fff.nvim)
  <leader>fw        Grep word/selection (fff.nvim)
  <leader>fc        Find config file (fff.nvim)
  <leader>fr        Recent files (fff.nvim)
  <leader><space>   Smart find files (fff.nvim)
  <leader>/         Grep (fff.nvim)
  <leader>E         File explorer (oil.nvim)
  -                 Open parent directory (oil.nvim), and `nvim <dir>` opens a listing too
  <leader>e         File explorer tree, reveals the current file
  <leader>sr        Search & replace (grug-far.nvim)

Buffers
  <leader>fb        Buffers (picker)
  <leader>bd        Delete buffer
  <leader>bo        Delete other buffers
  <leader>bb        Switch to other buffer
  <leader>bl        Close all left buffers
  <leader>br        Close all right buffers
  <Tab>/<S-Tab>     Next/Previous buffer
  <S-h>/<S-l>       Previous/Next buffer
  [b / ]b           Previous/Next buffer

Lists (picker)
  <leader>sm        Marks (Enter jumps to the mark)
  <leader>sj        Jumps
  <leader>s"        Registers (Enter pastes, <C-y> yanks)

  <leader>sq        Quickfix
  <leader>sl        Location list
  <leader>sC        Commands (Enter fills in the command)
  <leader>sa        Autocmds (Enter opens the source)
  <leader>sc        Command history
  <leader>s/        Search history

Windows
  Ctrl-h/j/k/l      Navigate windows
  <leader>sv        Vertical split
  <leader>sh        Horizontal split
  <leader>tn/tf/tl  Test nearest / file / last (vitest, go test), failures as diagnostics
  <leader>tc        Project check (tsc, go vet, cargo check) into quickfix
  <leader>U         Undo states (picker, Enter goes back to one)
  <leader>ww        Other window
  <leader>wd        Delete window
  <leader>w-        Split window below
  <leader>|         Split window right
  <leader>w=        Equalize window sizes
  <leader>wH        Move window far left
  <leader>wJ        Move window to bottom
  <leader>wK        Move window to top
  <leader>wL        Move window far right

Tabs
  <leader><tab><tab>  New tab
  <leader><tab>]     Next tab
  <leader><tab>[     Previous tab
  <leader><tab>d     Close tab
  <leader><tab>o     Close other tabs
  <leader><tab>f     First tab
  <leader><tab>l     Last tab
  <leader><tab>n     New tab with current buffer
  <leader><tab>m     Move tab

LSP (native)
  gd                Goto definition
  gD                Goto declaration
  gR                References
  gI                Goto implementation
  gy                Goto type definition
  K / <leader>k     Hover documentation
  <leader>K         Keywordprg on the word (man, :help for vim)
  <leader>ca / gra  Code actions, fixes first. In visual mode, for the selection
  <leader>cl        Fix all (LSP)
  <leader>cf        Format buffer (conform.nvim, else the LSP)
  <leader>cF        Which formatter conform picks and why
  <leader>cr        Rename
  <leader>cR        Restart the LSP servers on this buffer

  Auto-import writes `./thing.js`, not `./thing`, because Node ESM needs the
  extension and a bundler tsconfig leaves it out, and writes `import type` when
  the symbol is only used as a type. A project that wants
  typescript-language-server instead of vtsls puts this in its `.nvim.lua`
  (nvim runs it once the file is trusted, `:trust`):

    if vim.fn.executable("typescript-language-server") == 1 then
      vim.lsp.enable("vtsls", false)
      vim.lsp.enable("ts_ls")
    end
  <leader>ss        Document symbols
  <leader>cw        Workspace diagnostics

Git (vdiff.nvim)
  <leader>gg        LazyGit
  <leader>gc        Git: compare (universal)
  <leader>gC        Git: compare two refs
  <leader>gd        Git: working tree diff
  <leader>gD        Git: staged diff
  <leader>gf        Git: diff file vs HEAD
  <leader>gF        Git: diff file (universal)
  <leader>gV        Git: file history
  <leader>gv        Git: line history
  <leader>gx        Git: close all
  <leader>gm        Git: merge conflicts
  <leader>g2        Git: compare two files
  <leader>gy        Git: diff clipboard vs file
  <leader>gr...     Git: review prefix (MR/PR)
  <leader>ghs       Stage hunk
  <leader>ghu       Undo staged hunk
  <leader>ghr       Reset hunk

The file and line history lists preview the commit under the cursor, its diff
for the current file, as you move. Stash and review lists go through the same
picker, so they filter as you type. "Compare with" and "diff file with" list
the branches, tags and recent commits, with the ref's log in the preview, and
the working tree is a row of its own.

Debug (DAP)
  <leader>db        Toggle breakpoint
  <leader>dc        Run/Continue
  <leader>di        Step into
  <leader>do        Step over
  <leader>dO        Step out
  <leader>du        DAP view toggle
  <leader>dh        DAP hover

DAP setup (once)
  git clone https://github.com/microsoft/vscode-js-debug ~/vscode-js-debug
  cd ~/vscode-js-debug && npm ci && npx gulp dapDebugServer
  Nest: run `pnpm start:dev:debug`, then "Nvim Debug App" (attaches to :9229)
  Vitest: "Vitest (current file)" runs the open spec, "Vitest (sales)" runs the suite
  Vitest needs the service's test Postgres running (global setup)

Diagnostics
  <leader>cd        Line diagnostics
  <leader>sd        Document diagnostics (picker, filterable)
  <leader>cD        Workspace diagnostics (picker, filterable)
  ]d / [d           Next/Prev diagnostic
  ]e / [e           Next/Prev error
  ]w / [w           Next/Prev warning

Quickfix / Location
  <leader>xq        Quickfix list
  <leader>xl        Location list
  [q / ]q           Previous/Next quickfix
  <leader>cn/cp     Next/Previous quickfix
  <leader>co/cc     Open/Close quickfix
  <leader>ln/lp     Next/Previous location
  <leader>lo/lc     Open/Close location

Markdown
  <leader>um        Toggle render markdown
  <leader>mo        Markdown open (mo)

Sessions
  <leader>qs        Load the session of this directory
  <leader>qr        Delete the session of this directory
  :Session [dir]    Load a directory's session, the current one by default
  :Session save     Write the layout now
  :Session list     Every directory that has a session, <C-d> deletes one

Pack (vim.pack)
  <leader>pp        Pack UI
  <leader>pu        Pack update all
  <leader>pd        Pack delete plugin

UI toggles
  <leader>uw        Toggle wrap
  <leader>uL        Toggle relative number
  <leader>ul        Toggle line number
  <leader>uc        Toggle conceal level
  <leader>uA        Toggle tabline
  <leader>uf        Toggle autoformat
  <leader>us        Toggle spell
  <leader>uh        Toggle inlay hints
  <leader>ud        Toggle diagnostics
  <leader>R         Restart Neovim
  <leader>N         Neovim news (:help news)

Pasting over a selection with p replaces the unnamed register with the replaced text. Visual P writes the same text and leaves the yank in place, so it can be pasted again.

Screenshots

Lua Development

Markdown Preview


License

MIT