Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Editor defaults

General settings live in nixvim/options.nix, nixvim/autocmds.nix, nixvim/smartnumber.nix and nixvim/packages.nix. They are part of every profile.

Options

SettingValueEffect
mapleader, maplocalleaderSpaceLeader for all custom mappings
clipboardunnamedplusYank and paste use the system clipboard
tabstop, shiftwidth4Default indentation (vim-sleuth adapts it per file)
expandtabonSpaces instead of tabs
wrapoffNo soft wrapping
numberonLine numbers, see smart numbers
cursorlineoptnumberOnly the line number of the cursor line is highlighted
ignorecase, smartcaseonCase-insensitive search unless it contains capitals
hlsearchonHighlight search matches
inccommandsplitLive preview of :s in a split
undofileonPersistent undo history
breakindentonWrapped lines keep their indentation
exrconLoads trusted project-local .nvim.lua
mousemoveeventonHover effects (e.g. bufferline close button)
termguicolorson24-bit colors

netrw is disabled in favour of neo-tree. Diagnostic signs use Nerd Font icons; inline diagnostic text comes from tiny-inline-diagnostic.

Autocommands and commands

  • formatoptions loses c, r and o for every file type, so comments are not continued automatically.
  • Empty, unnamed buffers are closed as soon as a real file is opened.
  • Yanked text is briefly highlighted.
  • :W and :Q behave like :w and :q (with ! support).

Smart relative line numbers

Relative line numbers are shown in the focused window in normal mode. They switch to absolute numbers in insert mode, on the command line, in unfocused windows and when Neovim loses focus. Pickers, terminals and neo-tree are excluded.

Neovide

When running in Neovide, zenvim sets:

  • the font JetBrainsMono Nerd Font (13 pt) with Noto Color Emoji as fallback and a line spacing of 5,
  • 16 px padding, rounded floating windows and slight transparency,
  • the pixiedust cursor effect and short scroll animations,
  • <C-=> and <C--> to zoom in and out.

The colorscheme is opaque in Neovide and transparent everywhere else.

Bundled tools

fd, gcc, lazygit, noto-fonts-color-emoji, ripgrep and tree-sitter are added to the end of PATH (extraPackagesAfter). Like all bundled language tools, they only serve as fallback: if a project’s devshell provides a different version, that version is used.