Skip to content

Neovim

Neovim is a Vim-based text editor focused on extensibility, modern terminal features, Lua configuration, built-in LSP support, and plugin-driven workflows. In this setup it is the main terminal editor for editing code and dotfiles.

Why it matters

Neovim makes editing fast without leaving the terminal. This reduces context switching between terminal, editor, search tools, and Git workflows.

Neovim showing the Snacks picker and WezTerm configuration

Configuration file:

text
nvim/.config/nvim/init.lua

Requirements:

text
Neovim 0.10 or newer
Git for lazy.nvim plugin installation
ripgrep for Space f g
JetBrainsMono Nerd Font for icons

Official Resources

ResourceURL
Websiteneovim.io
Documentationneovim.io/doc
GitHubgithub.com/neovim/neovim

What It Is Used For Here

UseNotes
Editing codeFast keyboard-first editor inside the terminal.
Editing dotfilesMain editor for this repository's config and docs.
Project searchUses Snacks picker for files, text, and buffers.
Lua configurationThe setup lives in init.lua and is managed with lazy.nvim.

Problems It Solves

ProblemSolution in this setup
Finding files manually is slow.Space f f opens a file picker.
Searching text from the shell breaks flow.Space f g searches inside the project.
Open buffers are hard to track.Custom tabline plus Space f b make buffers visible and searchable.
Editor setup is hard to reproduce.The config is versioned in nvim/.config/nvim/init.lua.

First Steps

Open Neovim:

sh
nvim

Open the dotfiles project:

sh
cd ~/.config/dotfiles
nvim .

Use these first:

text
Space f f   find files
Space f g   search text
i           insert text
Esc         return to normal mode
:w          save
:q          quit

Leader Key

KeyMeaning
SpaceLeader key

Daily Usage

CommandAction
iEnter insert mode before the cursor
EscReturn to normal mode
Space f fSearch files
Space f gSearch text in the project
Space f bSearch open buffers
:wSave
:qQuit the current window
:q!Quit without saving
:wqSave and quit
/textSearch forward for text
nGo to the next search result
NGo to the previous search result
uUndo
Ctrl rRedo
ddDelete current line
yyCopy current line
pPaste after the cursor
:bdClose current buffer

Custom Shortcuts

ShortcutModeAction
Space f fNormalSearch files with Snacks picker
Space f gNormalSearch text with Snacks grep
Space f bNormalSearch open buffers with Snacks picker

These are the only custom Neovim key mappings currently defined by this project. The remaining commands on this page are standard Neovim commands or defaults provided by the installed plugins.

Using The Pickers

  1. Press Esc to make sure Neovim is in normal mode.
  2. Open a picker with Space f f, Space f g, or Space f b.
  3. Type to filter the results.
  4. Move through the list with the arrow keys.
  5. Press Enter to open the selected result.
  6. Press Esc to close the picker without selecting anything.

Space f g searches file contents from the current working directory. Start Neovim from the project root when you want the search to cover the whole project:

sh
cd path/to/project
nvim .

Common Shortcuts

Modes

ShortcutAction
EscReturn to normal mode
iInsert before cursor
aInsert after cursor
oOpen a new line below and enter insert mode
vEnter visual mode
VEnter visual line mode

Files

CommandAction
:wSave file
:qQuit current window
:q!Quit without saving
:wqSave and quit
:e path/to/fileOpen file

Editing

ShortcutAction
uUndo
Ctrl rRedo
yyCopy current line
pPaste after cursor
ddDelete current line
/textSearch forward
nNext search result
NPrevious search result

Buffers

CommandAction
:bnNext buffer
:bpPrevious buffer
:bdClose current buffer
Space f bSearch buffers with Snacks picker

UI

AreaConfiguration
ThemeCatppuccin Mocha
BackgroundTransparent
Line numbersAbsolute and relative numbers enabled
MouseEnabled
SearchIgnore case unless uppercase is used
StatuslineLualine
TablineCustom WezTerm-style buffer tabline

Configured Editor Behavior

OptionValueEffect
Leader keySpaceStarts project-specific shortcuts.
Line numbersAbsolute and relativeThe current line shows its number; other lines show jump distance.
MouseEnabledAllows selection, scrolling, and clicking UI elements.
True colorEnabledLets Catppuccin render its full terminal palette.
Search caseSmartLowercase searches ignore case; uppercase searches become case-sensitive.
Cursor lineEnabledHighlights the row containing the cursor.
Sign columnAlways visiblePrevents text shifting when diagnostics or Git signs appear.
StatuslineOne global lineLualine spans the complete Neovim window.
TablineAlways visibleOpen listed buffers remain visible at the top.
Command height0Hides the command area until Neovim needs it.
Popup transparency12Slightly blends completion and popup menus with the terminal.

The custom fill characters replace default separators with Powerline and box drawing glyphs. They require the Nerd Font configured in WezTerm.

Statusline And Buffer Line

The bottom Lualine statusline displays:

PositionInformation
LeftCurrent mode, Git branch, and Git diff summary.
CentreFile path and modified/read-only state.
RightDiagnostics, file type, progress through the file, and cursor location.

The top line is a list of buffers, not Vim tab pages. Each item shows a one-based index and filename. The current buffer is lavender, inactive buffers are dark, and unsaved buffers include +.

Buffers, windows, and tabs

A buffer is an open file. A window is a viewport showing a buffer. A Vim tab is a collection of windows. This setup deliberately uses the top line for buffers because that maps more closely to the tabs people expect from other editors.

Plugins

PluginPurpose
folke/lazy.nvimPlugin manager
catppuccin/nvimTheme
echasnovski/mini.iconsIcons
folke/snacks.nvimPicker and search UI
nvim-lualine/lualine.nvimStatusline

Plugin versions are pinned in nvim/.config/nvim/lazy-lock.json. This makes a new installation reproduce the tested plugin revisions rather than silently using unrelated newer versions.

Useful plugin maintenance commands:

CommandPurpose
:LazyOpen the lazy.nvim plugin manager.
:Lazy syncInstall missing plugins, update, and remove unused plugins.
:Lazy restoreReturn plugins to the revisions in lazy-lock.json.
:checkhealthRun Neovim and plugin diagnostics.

What Is Not Configured

This repository does not currently configure language servers, completion engines, formatters, debuggers, or Treesitter parsers. The editor provides the documented navigation, search, theme, buffers, and statusline without assuming a particular programming language.

Notes

The tabline shows listed buffers, not Vim tabs. Modified buffers get a + marker in the tab title.

On first launch, lazy.nvim is cloned and installs the versions pinned in lazy-lock.json. This requires internet access. Run :checkhealth if plugins do not load, and confirm rg --version if project grep fails.

Vim modes

Neovim is modal. Most commands run from normal mode. If a shortcut does not work, press Esc first and try again.