Neovim Starter Config: A Small, Documented Neovim Lua Config with LSP, Completion and Fuzzy Search
neovim-starter-config is a minimal Neovim configuration written in Lua for people who want a modern editor setup they can actually read. It gives you language servers (LSP) with auto-install, fast autocompletion, Telescope fuzzy search for files and text, Treesitter syntax highlighting, format on save and git signs, in about 600 lines of commented Lua that you are meant to own and change. It targets Neovim 0.12+ and uses the built-in plugin manager vim.pack and the native vim.lsp.config API, so there is no extra plugin manager to learn.
It is for Vim users moving to Neovim, VS Code users trying a terminal editor, and anyone who copied a big Neovim distribution and could not tell what any of it did.
Last reviewed: December 2026 (tested headless on Neovim 0.12.6).
Table of Contents
- What You Get
- Requirements
- Install
- Try It Without Replacing Your Config
- First Start
- File Tour
- Keymaps Reference
- LSP: Language Servers
- Completion with blink.cmp
- Fuzzy Search with Telescope
- Formatting
- Treesitter
- Git Integration
- Plugin Management with vim.pack
- Customization Recipes
- Neovim Lua Primer
- Vim Motions Cheat Sheet
- Troubleshooting
- Tests
- How This Compares to Neovim Distributions
- Learning Resources
- Plugins Compared
- FAQ
- Where to Go Next
- Contributing
- License
- More free resources
What You Get
| Feature | How | Plugin |
|---|---|---|
| Plugin manager | Built into Neovim 0.12 | vim.pack (no plugin) |
| Language servers | Native client, configs from nvim-lspconfig | nvim-lspconfig |
| Install servers and tools | :Mason UI |
mason.nvim, mason-lspconfig.nvim |
| Autocompletion + snippets | Fast fuzzy completion menu | blink.cmp, friendly-snippets |
| Fuzzy search | Files, grep, buffers, help, symbols | telescope.nvim, plenary.nvim |
| Syntax highlighting, folds | Neovim treesitter + parser installer | nvim-treesitter (main branch) |
| Format on save | Runs external formatters, LSP fallback | conform.nvim |
| Git hunks in the gutter | Stage, reset, blame, preview | gitsigns.nvim |
| Keymap hints | Popup after pressing <Space> |
which-key.nvim |
| Colorscheme | Dark theme | tokyonight.nvim |
Twelve plugins total. Everything else (status line, LSP keymaps, diagnostics, commenting with gc, snippets engine) is built into Neovim.
Requirements
Required
- Neovim 0.12 or newer. Check with
nvim --version. The config prints an error and stops on older versions, becausevim.packdoes not exist there. - git (
vim.packclones plugins with it).
Recommended
- ripgrep (
rg) for project-wide grep (<leader>fg). - fd for faster file finding (Telescope falls back to
rg --filesorfind). - A Nerd Font in your terminal for icons. No Nerd Font? Set
vim.g.have_nerd_font = falseininit.lua. - A clipboard tool on Linux (
wl-clipboardon Wayland,xcliporxselon X11) so yanks reach the system clipboard.
Optional
tree-sitterCLI plus a C compiler (cc,gccorclang) to install extra Treesitter parsers. Without them you still get Treesitter for the languages Neovim bundles (C, Lua, Vimscript, Vim help, Markdown, Treesitter queries) and regex highlighting for the rest.- Node.js, Python or Go only if a language server you install through Mason needs them (for example
ts_lsneeds Node).
Install the basics:
# macOS (Homebrew)
brew install neovim git ripgrep fd tree-sitter-cli
# Debian / Ubuntu (distro Neovim may be too old; see below)
sudo apt install git ripgrep fd-find build-essential
# Arch
sudo pacman -S neovim git ripgrep fd tree-sitter-cli
# Windows (winget)
winget install Neovim.Neovim Git.Git BurntSushi.ripgrep.MSVC sharkdp.fd
If your distro ships an older Neovim, follow the official Neovim install guide for prebuilt release archives, the AppImage and other options.
Install
Back up any existing config first:
mv ~/.config/nvim ~/.config/nvim.bak
mv ~/.local/share/nvim ~/.local/share/nvim.bak # plugins and data
Copy this repo into your config folder:
# macOS / Linux
git clone https://github.com/Ralpberry-Labs/neovim-starter-config ~/.config/nvim
# Windows PowerShell
git clone https://github.com/Ralpberry-Labs/neovim-starter-config $env:LOCALAPPDATA\nvim
Better: fork it first and clone your fork, so your changes live in your own repo.
Where Neovim looks for its config (:echo stdpath('config') shows yours):
| OS | Config folder | Data folder (plugins, Mason) |
|---|---|---|
| Linux / macOS | ~/.config/nvim |
~/.local/share/nvim |
| Windows | %LOCALAPPDATA%\nvim |
%LOCALAPPDATA%\nvim-data |
Try It Without Replacing Your Config
NVIM_APPNAME makes Neovim use a different config and data folder name, so you can test this side by side with your current setup:
git clone https://github.com/Ralpberry-Labs/neovim-starter-config ~/.config/nvim-starter
NVIM_APPNAME=nvim-starter nvim
Add an alias if you like it: alias nvs='NVIM_APPNAME=nvim-starter nvim'. Plugins go to ~/.local/share/nvim-starter, fully separate from your main config.
First Start
- Run
nvim.vim.packasks to confirm installing the plugins. Answer yes. Install runs in parallel and takes a few seconds. - Mason starts installing
lua-language-serverin the background. Watch progress with:Mason. - If
tree-sitteris installed, nvim-treesitter compiles the listed parsers in the background. - Run
:checkhealthand read the sections forvim.lsp,vim.pack,telescope,masonandblink.cmp. Fix anything marked ERROR. - Open a Lua file (try
:e $MYVIMRC) and hover avim.function withK. If docs appear, LSP works. - Press
<Space>and wait: which-key shows every leader mapping.
File Tour
.
├── init.lua entry point: version check, leader key, loads modules
├── lua/config/
│ ├── options.lua editor settings (numbers, tabs, search, undo...)
│ ├── keymaps.lua general keymaps (no plugins needed)
│ ├── autocmds.lua yank highlight, restore cursor, treesitter start...
│ ├── plugins.lua vim.pack plugin list + setup for each plugin
│ └── lsp.lua diagnostics, Mason, server settings, LspAttach maps
├── after/ftplugin/
│ ├── python.lua per-language overrides (4-space indent)
│ └── go.lua real tabs for Go
├── nvim-pack-lock.json created on first start: exact plugin revisions
└── tests/ headless smoke and plugin tests
Why this split: options, keymaps and autocmds work even if every plugin fails, so a broken plugin never leaves you with a broken editor. Each plugin setup in plugins.lua is wrapped in a small setup() helper that catches errors and shows a warning instead of stopping the config.
Keymaps Reference
The leader key is <Space>. Press it and pause to see the which-key popup.
General
| Keys | Mode | Action |
|---|---|---|
<Esc> |
normal | Clear search highlight |
<leader>w |
normal | Save file |
<leader>Q |
normal | Quit all |
<C-h> <C-j> <C-k> <C-l> |
normal | Move to the window left/down/up/right |
<C-Up> <C-Down> <C-Left> <C-Right> |
normal | Resize window |
<S-h> / <S-l> |
normal | Previous / next buffer |
<leader>bd |
normal | Close buffer |
< / > |
visual | Indent and keep selection |
J / K |
visual | Move selected lines down / up |
<C-d> / <C-u> |
normal | Half page down / up, cursor centered |
<leader>p |
visual | Paste over selection without losing the yank |
<Esc><Esc> |
terminal | Back to normal mode |
<leader>uw |
normal | Toggle line wrap |
<leader>ur |
normal | Toggle relative numbers |
gcc / gc |
normal / visual | Toggle comment (built into Neovim) |
Find (Telescope)
| Keys | Action |
|---|---|
<leader>ff |
Find files (includes dotfiles, respects .gitignore) |
<leader>fg |
Live grep across the project (needs ripgrep) |
<leader>fw |
Grep the word under the cursor |
<leader>fb |
Open buffers |
<leader>fr |
Recently opened files |
<leader>fh |
Search :help |
<leader>fk |
Search keymaps |
<leader>fd |
Diagnostics list |
<leader>fs |
Symbols in this file (LSP) |
<leader>fS |
Symbols in the workspace (LSP) |
<leader>f. |
Reopen the last picker with the same query |
<leader>/ |
Fuzzy search inside the current buffer |
<leader>fn |
Find files in your Neovim config |
Inside a picker: <C-n>/<C-p> or arrows move, <CR> opens, <C-x> opens in a split, <C-v> in a vertical split, <C-t> in a tab, <C-q> sends results to the quickfix list, <Esc> closes.
LSP
Neovim 0.11+ creates most LSP keymaps by default. This config adds a few familiar ones.
| Keys | Source | Action |
|---|---|---|
K |
built in | Hover documentation |
gd |
this config | Go to definition |
gD |
this config | Go to declaration |
grn / <leader>cr |
built in / this config | Rename symbol |
gra / <leader>ca |
built in / this config | Code action |
grr |
built in | List references |
gri |
built in | Go to implementation |
grt |
built in (0.12) | Go to type definition |
gO |
built in | Document symbols |
<C-s> |
built in (insert) | Signature help |
[d / ]d |
built in | Previous / next diagnostic |
<leader>e |
this config | Show diagnostics for the line |
<leader>q |
this config | Diagnostics to the location list |
<leader>uh |
this config | Toggle inlay hints |
<C-]> |
built in | Jump to definition (tagfunc uses LSP) |
Code and Git
| Keys | Action |
|---|---|
<leader>cf |
Format buffer or selection |
<leader>uf |
Toggle format on save |
]h / [h |
Next / previous git hunk |
<leader>hs |
Stage hunk |
<leader>hr |
Reset hunk |
<leader>hp |
Preview hunk |
<leader>hb |
Blame current line |
<leader>hd |
Diff file against the index |
Completion menu
| Keys | Action |
|---|---|
<C-space> |
Open menu / toggle docs |
<C-n> / <C-p> |
Next / previous item |
<C-y> |
Accept |
<C-e> |
Close menu |
<Tab> / <S-Tab> |
Jump forward / back inside a snippet |
<C-b> / <C-f> |
Scroll documentation |
LSP: Language Servers
A language server gives you go-to-definition, hover docs, diagnostics, rename and code actions. Neovim has a built-in LSP client; you only need to tell it which servers to start.
How the pieces fit
- nvim-lspconfig ships a config file for hundreds of servers (
lsp/<name>.lua) with the right command, filetypes and project root markers. Neovim reads these from the runtimepath. - mason.nvim downloads server binaries to Neovim’s data folder, so you do not need a system install.
- mason-lspconfig runs
vim.lsp.enable()for every server Mason installed (automatic_enable = true). vim.lsp.config()inlua/config/lsp.luaadds your own settings on top.
Add a language
Option A, interactive: run :Mason, move to a server, press i. It is enabled automatically next time you open a matching file.
Option B, declarative: add the server name to ensure_installed in lua/config/lsp.lua so it installs on every machine:
local ensure_installed = {
'lua_ls',
'basedpyright', -- Python
'ts_ls', -- TypeScript / JavaScript
'gopls', -- Go
}
Server names are nvim-lspconfig names (:help lspconfig-all lists them). Mason’s own package names differ sometimes (lua-language-server vs lua_ls); mason-lspconfig translates.
Option C, server already on your system (installed with rustup component add rust-analyzer, go install, Homebrew…):
vim.lsp.enable({ 'gopls', 'rust_analyzer' })
Common servers
| Language | lspconfig name | Notes |
|---|---|---|
| Lua | lua_ls |
Preconfigured to know the vim API |
| Python | basedpyright or pyright |
Add ruff too for lint diagnostics and quick fixes |
| TypeScript / JavaScript | ts_ls or vtsls |
Needs Node.js |
| Go | gopls |
go install golang.org/x/tools/gopls@latest |
| Rust | rust_analyzer |
Prefer the rustup component so it matches your toolchain |
| C / C++ | clangd |
Needs compile_commands.json for real projects |
| JSON | jsonls |
|
| YAML | yamlls |
|
| Bash | bashls |
Uses shellcheck if installed |
| HTML / CSS | html, cssls |
|
| Tailwind CSS | tailwindcss |
|
| Docker | dockerls |
|
| Terraform | terraformls |
|
| Markdown | marksman |
Change server settings
vim.lsp.config(name, table) merges your table into the defaults. Example for Python with basedpyright:
vim.lsp.config('basedpyright', {
settings = {
basedpyright = {
analysis = { typeCheckingMode = 'standard', diagnosticMode = 'openFilesOnly' },
},
},
})
Example: use a project-local binary instead of a global one:
vim.lsp.config('ts_ls', {
cmd = { 'npx', 'typescript-language-server', '--stdio' },
})
Settings that apply to every server go in vim.lsp.config('*', {...}). This config uses it to pass blink.cmp’s completion capabilities.
Your own server config from scratch
You do not need nvim-lspconfig for a server it does not know. Create lsp/myserver.lua in your config folder:
-- ~/.config/nvim/lsp/myserver.lua
return {
cmd = { 'myserver', '--stdio' },
filetypes = { 'mylang' },
root_markers = { 'myproject.toml', '.git' },
}
Then vim.lsp.enable('myserver').
Inspect what is running
:checkhealth vim.lspshows enabled configs, attached clients and their settings.:lsp(Neovim 0.12) manages clients interactively;:lsp restartrestarts them.:lua =vim.lsp.get_clients({ bufnr = 0 })prints clients for this buffer.- The log lives at
:lua =vim.lsp.log.get_filename(). Raise detail withvim.lsp.log.set_level('debug').
Completion with blink.cmp
blink.cmp shows a completion menu as you type, from four sources: LSP, file paths, snippets and words in open buffers. It is pinned to the 1.x release tags because those ship a prebuilt Rust fuzzy matcher; on the main branch you would have to build it yourself.
Change the key preset in lua/config/plugins.lua:
keymap = { preset = 'super-tab' }, -- Tab accepts, like VS Code
-- or
keymap = { preset = 'enter' }, -- Enter accepts
Disable completion in some filetypes:
require('blink.cmp').setup({
enabled = function()
return not vim.tbl_contains({ 'markdown', 'text' }, vim.bo.filetype)
end,
-- ...rest of the options
})
Snippets come from friendly-snippets (VS Code format). Add your own by creating snippets/<filetype>.json in your config folder and a snippets/package.json that lists them, in the same layout friendly-snippets uses.
Prefer no plugin at all? Neovim 0.12 has a built-in 'autocomplete' option and vim.lsp.completion.enable(). They are simpler and less configurable; blink.cmp is kept here because it handles snippets, paths and buffer words in one menu.
Fuzzy Search with Telescope
Telescope is a picker: a prompt, a filtered list and a preview. Every <leader>f mapping opens one. Useful built-in pickers that are not mapped yet:
| Picker | What it searches |
|---|---|
:Telescope git_files |
Files tracked by git |
:Telescope git_status |
Changed files with diff preview |
:Telescope git_commits |
Commit history |
:Telescope commands |
Ex commands |
:Telescope command_history |
Commands you ran |
:Telescope search_history |
Previous / searches |
:Telescope marks |
Marks |
:Telescope registers |
Register contents |
:Telescope quickfix |
Current quickfix list |
:Telescope lsp_references |
References of the symbol under cursor |
:Telescope treesitter |
Functions and variables from treesitter |
:Telescope colorscheme |
Live preview of installed colorschemes |
:Telescope builtin |
A picker of all pickers |
Map one:
vim.keymap.set('n', '<leader>gs', require('telescope.builtin').git_status, { desc = 'Git status' })
Grep only some file types: in <leader>fg, ripgrep options are not typed in the prompt, so add a variant:
vim.keymap.set('n', '<leader>fG', function()
require('telescope.builtin').live_grep({ additional_args = { '--hidden', '--glob', '!.git' } })
end, { desc = 'Grep including hidden files' })
Faster sorting on very large repos: add the native sorter telescope-fzf-native.nvim. It needs make and a C compiler, so build it from a PackChanged hook (see Plugin Management) and call require('telescope').load_extension('fzf').
Formatting
conform.nvim runs a formatter on save. Formatters are separate programs; install them with :Mason (search the name) or your package manager.
| Filetype | Formatter in this config | Install |
|---|---|---|
| Lua | stylua |
:MasonInstall stylua |
| Python | ruff_format |
:MasonInstall ruff or uv tool install ruff |
| JS / TS / JSON | prettierd, else prettier |
:MasonInstall prettierd |
| Go | gofmt |
Ships with Go |
| Rust | rustfmt |
rustup component add rustfmt |
| Shell | shfmt |
:MasonInstall shfmt |
If no formatter is configured or found, conform falls back to the language server’s formatter (lsp_format = 'fallback').
- Format manually:
<leader>cf. - Turn off format on save globally:
<leader>uf. For one buffer::let b:disable_autoformat = v:true. - See which formatters apply to the current file:
:ConformInfo.
Run several formatters in order:
python = { 'ruff_fix', 'ruff_format' }, -- fix lint issues, then format
Treesitter
Treesitter parses code into a syntax tree, which gives more accurate highlighting, folds and text selection than regex syntax files.
- Neovim bundles parsers for C, Lua, Vimscript, Vim help, Markdown and Treesitter queries.
- The
FileTypeautocommand inlua/config/autocmds.luacallsvim.treesitter.start()for any buffer whose language has a parser, and also sets treesitter folds (zatoggles a fold,zRopens all,zMcloses all). - nvim-treesitter’s
mainbranch installs more parsers. It compiles them locally, so it needs thetree-sitterCLI and a C compiler. Iftree-sitteris not on your$PATH, the config skips installs silently.
Commands:
| Command | Action |
|---|---|
:TSInstall python |
Install a parser |
:TSUpdate |
Update installed parsers (run after updating the plugin; the config’s PackChanged hook does it for you) |
:TSUninstall python |
Remove a parser |
:InspectTree |
Show the syntax tree of the current buffer (built in) |
:Inspect |
Show highlight groups under the cursor (built in) |
Git Integration
gitsigns marks added, changed and deleted lines in the sign column and lets you act on hunks without leaving the file. Common flow:
- Edit a file, see
▎marks in the gutter. ]hto jump to the next change,<leader>hpto preview the diff.<leader>hsto stage just that hunk,<leader>hrto throw it away.- Commit in a terminal (
:terminalor another tab).
For a full git UI, consider adding neogit or vim-fugitive.
Plugin Management with vim.pack
vim.pack is Neovim’s built-in plugin manager (new in 0.12, still marked experimental in :help vim.pack). It clones plugins with git into stdpath('data')/site/pack/core/opt/ and records exact revisions in nvim-pack-lock.json next to init.lua.
| Task | How |
|---|---|
| Add a plugin | Add its URL to the vim.pack.add({...}) list in plugins.lua, restart (:restart) |
| Pin a version range | { src = '...', version = vim.version.range('2') } |
| Follow a branch / tag / commit | { src = '...', version = 'main' } |
| Update all plugins | :PackUpdate, review the diff buffer, :write to apply or :quit to cancel |
| Update one plugin | :lua vim.pack.update({ 'telescope.nvim' }) |
| Remove a plugin | Delete it from the list, restart, then :PackClean |
| See what is installed | :lua =vim.pack.get() |
| Roll back an update | Restore the old nvim-pack-lock.json (from git), then :lua vim.pack.update(nil, { target = 'lockfile' }) |
| Run a build step | A PackChanged autocommand, registered before vim.pack.add() |
Commit nvim-pack-lock.json with your config. On a new machine, the first start installs exactly the revisions in the lockfile instead of whatever is newest.
Build hook example (for telescope-fzf-native):
vim.api.nvim_create_autocmd('PackChanged', {
callback = function(ev)
local d = ev.data
if d.spec.name == 'telescope-fzf-native.nvim' and (d.kind == 'install' or d.kind == 'update') then
vim.system({ 'make' }, { cwd = d.path }):wait()
end
end,
})
Lazy loading. vim.pack loads every plugin at startup. With twelve plugins, startup is still fast (check with nvim --startuptime /tmp/startup.log). To defer a heavy plugin, give it load = false behaviour by calling vim.pack.add() for it later, for example inside an autocommand or a keymap callback.
Customization Recipes
Change the colorscheme
-- in plugins.lua: add the plugin. The repo is literally named "neovim",
-- so give it a clearer folder name.
{ src = gh('rose-pine/neovim'), name = 'rose-pine' },
-- and replace the tokyonight setup with:
vim.cmd.colorscheme('rose-pine')
Neovim also ships colorschemes; try :colorscheme habamax, retrobox, sorbet, unokai or default (the default theme is decent since 0.10).
Per-language indentation
Create after/ftplugin/<filetype>.lua. Find a filetype name with :set filetype?.
-- after/ftplugin/javascript.lua
vim.opt_local.shiftwidth = 2
vim.opt_local.tabstop = 2
Or use an EditorConfig file in the project; Neovim reads .editorconfig natively.
Add a keymap
vim.keymap.set('n', '<leader>x', '<cmd>!chmod +x %<CR>', { desc = 'Make file executable' })
vim.keymap.set({ 'n', 'v' }, '<leader>y', '"+y', { desc = 'Yank to system clipboard' })
Always pass desc: it shows up in which-key and in <leader>fk.
Add a plugin with configuration
Example: a file explorer, oil.nvim, which edits directories like a buffer.
-- 1. add to the vim.pack.add list
gh('stevearc/oil.nvim'),
-- 2. configure below the list
setup('oil', function()
require('oil').setup()
vim.keymap.set('n', '-', '<cmd>Oil<CR>', { desc = 'Open parent directory' })
end)
Status line without a plugin
The default status line in 0.12 already shows diagnostics and LSP progress. Customize it with plain options:
vim.o.statusline = ' %f %m%r %= %{&filetype} %l:%c %p%% '
Disable a feature
- Relative numbers: delete
opt.relativenumber = trueinoptions.lua. - Spell check in Markdown: remove
vim.opt_local.spell = trueinautocmds.lua. - A whole plugin: remove it from the list and its
setup(...)block, restart,:PackClean.
Machine-specific settings
Keep personal secrets and paths out of the shared config:
-- at the end of init.lua
pcall(require, 'local') -- loads lua/local.lua if it exists
Add lua/local.lua to .gitignore.
Neovim Lua Primer
Enough Lua and Neovim API to edit this config with confidence.
-- Variables and tables
local name = 'nvim' -- always use `local`
local list = { 'a', 'b' } -- arrays are 1-indexed: list[1] == 'a'
local map = { key = 'value' } -- map.key or map['key']
-- Functions
local function greet(who) return 'hi ' .. who end -- `..` joins strings
-- Conditionals
if vim.fn.has('mac') == 1 then
print('macOS')
elseif vim.fn.has('win32') == 1 then
print('Windows')
end
-- Loops
for i, item in ipairs(list) do print(i, item) end
for k, v in pairs(map) do print(k, v) end
| You want to | Lua |
|---|---|
| Set a global option | vim.o.number = true |
| Set a window-local option | vim.wo.wrap = false |
| Set a buffer-local option | vim.bo.shiftwidth = 4 |
| Option with list/map helpers | vim.opt.listchars = { tab = '» ' } |
| Run an Ex command | vim.cmd('split') or vim.cmd.split() |
| Call a Vimscript function | vim.fn.expand('%:p') |
| Set a variable | vim.g.mapleader = ' ', vim.b.foo = 1 |
| Create a keymap | vim.keymap.set('n', 'lhs', rhs, { desc = '...' }) |
| Create an autocommand | vim.api.nvim_create_autocmd('BufWritePre', { callback = fn }) |
| Create a user command | vim.api.nvim_create_user_command('Name', fn, {}) |
| Show a message | vim.notify('hello', vim.log.levels.INFO) |
| Inspect any value | :lua =vim.lsp.config.lua_ls or print(vim.inspect(x)) |
| Run a shell command | vim.system({ 'ls', '-la' }):wait().stdout |
| Reload a module | package.loaded['config.keymaps'] = nil; require('config.keymaps') |
| Get a standard path | vim.fn.stdpath('config'), 'data', 'state', 'cache' |
require('config.options') loads lua/config/options.lua. Dots become folder separators, and every folder named lua/ on the runtimepath is searched.
Read more: :help lua-guide is the official introduction and is excellent.
Vim Motions Cheat Sheet
The keys that make Vim fast. Learn a few at a time.
Moving
| Keys | Moves to |
|---|---|
h j k l |
left, down, up, right |
w / b / e |
next word start / previous word start / word end |
W / B / E |
same, but words are separated only by spaces |
0 / ^ / $ |
line start / first non-blank / line end |
gg / G |
first line / last line |
42G or :42 |
line 42 |
{ / } |
previous / next blank line (paragraph) |
% |
matching bracket |
f{char} / t{char} |
to / just before the next {char} on the line (; repeats, , reverses) |
H / M / L |
top / middle / bottom of the screen |
<C-o> / <C-i> |
back / forward in the jump list |
* / # |
next / previous occurrence of the word under the cursor |
zz / zt / zb |
scroll so the cursor line is centered / top / bottom |
Editing (operator + motion)
Operators: d delete, c change, y yank (copy), > indent, < unindent, gu lowercase, gU uppercase, = re-indent, gc comment.
| Keys | Does |
|---|---|
dw |
delete to the next word |
d$ or D |
delete to end of line |
dd |
delete line |
cc |
change line |
ci" |
change inside quotes |
da( |
delete parentheses and their content |
yi{ |
yank inside braces |
dap |
delete a paragraph |
>ip |
indent the paragraph |
gUiw |
uppercase the word |
gcip |
comment the paragraph |
x / r{char} |
delete char / replace char |
p / P |
paste after / before |
u / <C-r> |
undo / redo |
. |
repeat the last change |
Text objects: iw/aw word, is/as sentence, ip/ap paragraph, i"/a" quotes, i(/a( parens, i{/a{ braces, it/at HTML tags. i means inside, a includes the delimiters.
Insert mode entries
i before cursor, a after, I line start, A line end, o new line below, O new line above, s replace char, S replace line.
Search and replace
| Keys | Does |
|---|---|
/text then n / N |
search forward, next / previous |
:%s/old/new/g |
replace in the whole file |
:%s/old/new/gc |
same, confirm each |
:'<,'>s/old/new/g |
replace in the visual selection |
:g/pattern/d |
delete every line that matches |
:v/pattern/d |
delete every line that does not match |
This config sets inccommand=split, so you see substitutions live before pressing Enter.
Windows, buffers, tabs
| Keys | Does |
|---|---|
:sp / :vs |
horizontal / vertical split |
<C-w>q |
close window |
<C-w>o |
close all other windows |
<C-w>= |
equalize sizes |
:e file |
open file |
:b name |
switch to buffer by partial name |
:tabnew / gt / gT |
new tab / next / previous |
Macros and registers
| Keys | Does |
|---|---|
qa … q |
record a macro into register a |
@a / @@ |
play macro a / repeat last macro |
5@a |
play it 5 times |
"ay |
yank into register a |
"+y / "+p |
system clipboard (already the default here via clipboard=unnamedplus) |
:reg |
show registers |
Troubleshooting
“neovim-starter-config needs Neovim 0.12 or newer”. Your nvim is older. Install a current release, then check which -a nvim to make sure the new one comes first on $PATH.
Plugins did not install. Check that git works and you have network access. Run :checkhealth vim.pack. To start over, delete the plugin folder (:lua print(vim.fn.stdpath('data') .. '/site/pack/core') prints it) and restart.
<leader>fg shows nothing. ripgrep is missing. rg --version must work in the same shell that starts Neovim.
No LSP features. Run :checkhealth vim.lsp. Common causes: the server is not installed (:Mason), the file has no project root (open the folder that contains package.json, go.mod, .git…), or the filetype is wrong (:set filetype?).
lua_ls warns “undefined global vim”. The server started before reading settings, or you edit Lua outside this config. Restart it with :lsp restart.
Icons look like boxes or question marks. Your terminal font is not a Nerd Font. Install one and select it in the terminal settings, or set vim.g.have_nerd_font = false.
Clipboard does not work on Linux or over SSH. Install wl-clipboard or xclip. Over SSH, Neovim can use OSC 52 if your terminal supports it; see :help clipboard-osc52.
Colors look wrong inside tmux. Add to ~/.tmux.conf: set -g default-terminal "tmux-256color" and set -ag terminal-overrides ",xterm-256color:RGB".
Treesitter parser errors after an update. Run :TSUpdate. If a parser fails to compile, check tree-sitter --version and that a C compiler is available.
Something is slow. nvim --startuptime /tmp/s.log +q && sort -k2 -n /tmp/s.log | tail shows slow startup steps. For editing lag, try :lsp stop to rule out a language server.
Start clean to isolate a problem. NVIM_STARTER_SKIP_PLUGINS=1 nvim loads options, keymaps and autocommands only. nvim --clean loads no config at all.
Tests
Two headless test scripts, each using throwaway XDG folders so they never touch your real config:
./tests/run.sh # core config only, no network (options, keymaps, autocmds, LSP config)
./tests/run_plugins.sh # installs all plugins with vim.pack, checks each loads and is configured
Both pass on Neovim 0.12.6 on macOS (December 2026). run_plugins.sh needs network access and git.
How This Compares to Neovim Distributions
| This repo | kickstart.nvim | LazyVim | AstroNvim / NvChad | |
|---|---|---|---|---|
| Size | ~600 lines, 6 files | One large commented file | Large framework | Large framework |
| Plugin manager | Built-in vim.pack |
lazy.nvim | lazy.nvim | lazy.nvim |
| You own every line | Yes | Yes | No, you configure on top | No, you configure on top |
| Batteries | LSP, completion, search, format, git | Similar | Many extras | Many extras |
| Best for | Learning and a lean daily driver | Learning, single file | Full IDE quickly | Full IDE quickly |
Pick a distribution if you want everything now. Pick a small config like this one if you want to understand and control your editor.
Learning Resources
:Tutorinside Neovim: the interactive tutorial. Do it once.:help lua-guide: official guide to configuring Neovim with Lua.:help lsp-quickstart: native LSP setup.:help vim.pack: the built-in plugin manager.:help news-0.12: what changed in the latest release.- Neovim documentation online.
- nvim-lspconfig server list with install instructions per server.
- Learn Vimscript the Hard Way for the Vim side of things.
Fuzzy Finders, Completion Engines and Plugin Managers Compared
| Job | In this config | Popular alternatives | Why this pick |
|---|---|---|---|
| Fuzzy finder | telescope.nvim | fzf-lua (uses the fzf binary, very fast), snacks.nvim picker, mini.pick from mini.nvim | Most documented, huge extension ecosystem |
| Completion | blink.cmp | nvim-cmp, built-in 'autocomplete' + vim.lsp.completion |
Fast, one plugin for LSP, snippets, paths and buffer words |
| Plugin manager | Built-in vim.pack |
lazy.nvim (lazy loading, UI), mini.deps | No extra dependency, lockfile included |
| Formatting | conform.nvim | none-ls.nvim, LSP formatting only | Simple per-filetype config, LSP fallback |
| Linting | LSP diagnostics | nvim-lint | Add nvim-lint if your linter has no language server |
| File explorer | none (use :Explore or Telescope) |
oil.nvim, neo-tree.nvim, nvim-tree.lua | Keep the core small; recipe above adds oil |
FAQ
Is this a Neovim distribution? No. It is a starting point you copy and own. There is no framework layer and no update mechanism except your own git history.
Does it work on Neovim 0.11?
No: it uses vim.pack, which arrived in 0.12. On 0.11 you could replace vim.pack.add with lazy.nvim, but upgrading Neovim is simpler.
Do I need a Nerd Font?
No. Set vim.g.have_nerd_font = false and the config falls back to plain text signs.
How do I use it with VS Code-style keys?
Change the blink.cmp preset to 'super-tab' or 'enter', and add the mappings you miss with vim.keymap.set. Learning the Vim motions table above pays off quickly.
How fast does it start?
Twelve eagerly loaded plugins typically start in well under 100 ms on a modern machine. Measure yours with nvim --startuptime /tmp/s.log +q.
Can I use it over SSH or in a container? Yes. Install Neovim 0.12+, git and ripgrep, clone the config, and plugins install on first start. Clipboard over SSH works through OSC 52 in supporting terminals.
How do I add Copilot or another AI completion?
Add a plugin such as copilot.lua, or use Neovim 0.12’s built-in LSP inline completion with a language server that supports textDocument/inlineCompletion (see :help lsp-inline_completion).
Where are plugins stored?
In stdpath('data')/site/pack/core/opt/ (usually ~/.local/share/nvim/site/pack/core/opt/).
How do I go back to my old config?
Move the backup back: mv ~/.config/nvim.bak ~/.config/nvim (and the data folder backup), or keep both using NVIM_APPNAME.
Where to Go Next
- Finish
:Tutor, then read:help lua-guideend to end. - Read every file in
lua/config/once; change one thing a day. - Add language servers for the languages you use and learn the built-in LSP keys (
grn,gra,grr,gd). - Browse awesome-neovim for plugins, but add them one at a time with a reason.
- Read
:help news-0.12after each Neovim upgrade to pick up new built-in features you can use instead of plugins.
Contributing
PRs are welcome. Keep it small: this config should stay readable in one sitting.
- New plugins need a strong reason and a comment explaining what they do.
- Keymaps must have a
desc. - Run
./tests/run.sh(and./tests/run_plugins.shif you touched plugins) before opening a PR. - Keep the README accurate: if you change a keymap, update the tables.
License
MIT. See LICENSE. Plugins keep their own licenses.
If this helped you, a star helps others find it.
More free resources
Part of the Ralpberry Labs open-source collection. See also Top 100 Open Source.