Rafael Bodill's Neovim Config

April 2, 2026 Β· View on GitHub

Lean mean Neovim machine, 30-45ms startup time. Works best with Neovim β‰₯0.11.2

(powered by LazyVimπŸ’€)

:gear: See Extending for customizing configuration and adding plugins.

I encourage you to fork this repo and create your own experience. Learn how to tweak and change Neovim to the way YOU like it. This is my cultivation of years of tweaking, use it as a git remote and stay in-touch with upstream for reference or cherry-picking.

Table of Contents (πŸ”Ž Click to expand/collapse)

Features

  • Fast startup time β€” plugins are almost entirely lazy-loaded!
  • Robust, yet light-weight
  • Plugin management with folke/lazy.nvim. Use with :Lazy or Space+l
  • Install LSP, DAP, linters, and formatters. Use with :Mason or Space+cm
  • LSP configuration with nvim-lspconfig
  • telescope.nvim centric work-flow with lists (try ;+f…)
  • Custom context-menu (try it! ;+c)
  • Auto-complete setup with blink.cmp or nvim-cmp
  • Structure view with [hedyhli/outline.nvim]
  • Git features using lewis6991/gitsigns.nvim, sindrets/diffview.nvim, and more
  • Session management with folke/persistence.nvim
  • Unobtrusive, yet informative status & tab lines
  • Premium color-schemes
  • Remembers last-used colorscheme

Screenshot

Vim screenshot

Prerequisites

  • git β‰₯ 2.19.0 (brew install git)
  • Neovim β‰₯ v0.11.2 (brew install neovim)

Optional, but highly recommended:

  • bat (brew install bat)
  • fd (brew install fd)
  • fzf (brew install fzf)
  • ripgrep (brew install ripgrep)
  • zoxide (brew install zoxide)

Install

  1. Let's clone this repo! Clone to ~/.config/nvim

    mkdir -p ~/.config
    git clone git@github.com:rafi/vim-config.git ~/.config/nvim
    cd ~/.config/nvim
    
  2. Run nvim (will install all plugins the first time).

    It's highly recommended running :checkhealth to ensure your system is healthy and meet the requirements.

  3. Inside Neovim, run :LazyExtras and use x to install extras.

Enjoy! :smile:

Install LSP, DAP, Linters, Formatters

Use :Mason (or Space+cm) to install and manage LSP servers, DAP servers, linters and formatters. See :h mason.nvim and mason-org/mason.nvim for more information.

Language-Server Protocol (LSP)

You can install LSP servers using :Mason UI, or :MasonInstall <name>, or :LspInstall <name> (use Tab to list available servers). See Mason's PACKAGES.md for the official list, and the Language server mapping list. You can also view at :h mason-lspconfig-server-map

You'll need utilities like npm and curl to install some extensions, see requirements (or :h mason-requirements) for more information.

See lua/rafi/plugins/lsp/init.lua for custom key-mappings and configuration for some language-servers.

:MasonInstall ansible-language-server bash-language-server css-lsp
:MasonInstall dockerfile-language-server gopls html-lsp json-lsp
:MasonInstall lua-language-server marksman pyright sqlls
:MasonInstall svelte-language-server typescript-language-server
:MasonInstall tailwindcss-language-server
:MasonInstall vim-language-server yaml-language-server

and more…

:MasonInstall vint shellcheck editorconfig-checker flake8 gitlint hadolint
:MasonInstall markdownlint mypy selene shellharden write-good yamllint
:MasonInstall black fixjson gofumpt golines isort
:MasonInstall shfmt sql-formatter stylua

On macOS with Homebrew, choose one of the Nerd Fonts, for example, here are some popular fonts:

brew tap homebrew/cask-fonts
brew search nerd-font
brew install --cask font-victor-mono-nerd-font
brew install --cask font-iosevka-nerd-font-mono
brew install --cask font-hack-nerd-font
brew install --cask font-fira-code

Upgrade

To upgrade packages and plugins:

  • Neovim plugins: :Lazy update
  • Mason packages: :Mason and press U

To update Neovim configuration from my repo:

git pull --ff --ff-only

Structure

  • after/ β€” Language specific custom settings and plugins.
  • lua/ β€” Lua configurations
    • config/ β€” Custom user configuration
    • plugins/ β€” Custom user plugins (or lua/plugins.lua)
    • rafi/
  • snippets/ β€” Personal code snippets

Extending

Extend: Config

Fork this repository and create a directory lua/config with one or more of these files: (Optional)

  • lua/config/autocmds.lua β€” Custom auto-commands
  • lua/config/options.lua β€” Custom options
  • lua/config/keymaps.lua β€” Custom key-mappings
  • lua/config/setup.lua β€” Override config, see extend defaults.

Adding plugins or override existing options:

  • lua/plugins/*.lua or lua/plugins.lua β€” Plugins (See lazy.nvim specs for syntax)

Extend: Plugins

Install "extras" plugins using :LazyExtras and installing with x. This saves choices in lazyvim.json which you can also edit manually, here's a recommended starting point:

{
  "extras": [
    "lazyvim.plugins.extras.ai.copilot",
    "lazyvim.plugins.extras.coding.neogen",
    "lazyvim.plugins.extras.coding.yanky",
    "lazyvim.plugins.extras.dap.core",
    "lazyvim.plugins.extras.dap.nlua",
    "lazyvim.plugins.extras.lang.docker",
    "lazyvim.plugins.extras.lang.json",
    "lazyvim.plugins.extras.lang.svelte",
    "lazyvim.plugins.extras.lang.terraform",
    "lazyvim.plugins.extras.lang.toml",
    "lazyvim.plugins.extras.lang.typescript",
    "lazyvim.plugins.extras.test.core",
    "lazyvim.plugins.extras.util.mini-hipatterns",
    "rafi.plugins.extras.lang.ansible",
    "rafi.plugins.extras.lang.go",
    "rafi.plugins.extras.lang.helm",
    "rafi.plugins.extras.lang.kubernetes",
    "rafi.plugins.extras.lang.markdown",
    "rafi.plugins.extras.lang.python",
    "rafi.plugins.extras.lang.tmux",
    "rafi.plugins.extras.ui.deadcolumn"
  ],
  "news": [],
  "version": 2
}

For installing/overriding/disabling plugins, create a lua/plugins/foo.lua file (or lua/plugins/foo/bar.lua or simply lua/plugins.lua) and manage your own plugin collection. You can add or override existing plugins' options, or just disable them all-together. Here's an example:

return {

  -- Disable default tabline
  { 'akinsho/bufferline.nvim', enabled = false },

  -- And choose a different one!
  -- { 'itchyny/lightline.vim' },
  -- { 'vim-airline/vim-airline' },
  -- { 'glepnir/galaxyline.nvim' },
  -- { 'glepnir/spaceline.vim' },
  -- { 'liuchengxu/eleline.vim' },

  -- Enable GitHub's Copilot
  { import = 'lazyvim.plugins.extras.ai.copilot' },

  -- Enable incline, displaying filenames on each window
  { import = 'rafi.plugins.extras.ui.incline' },

  -- Disable built-in plugins
  { 'shadmansaleh/lualine.nvim', enabled = false },
  { 'folke/persistence.nvim', enabled = false },

  -- Change built-in plugins' options
  {
    'nvim-treesitter/nvim-treesitter',
    opts = {
      ensure_installed = {
        'bash', 'comment', 'css', 'diff', 'dockerfile', 'fennel', 'fish',
        'gitcommit', 'gitignore', 'gitattributes', 'git_rebase', 'go', 'gomod',
        'gosum', 'gowork', 'graphql', 'hcl', 'html', 'javascript', 'jsdoc',
        'json', 'json5', 'jsonnet', 'lua', 'make', 'markdown',
        'markdown_inline', 'nix', 'perl', 'php', 'pug', 'python', 'regex',
        'rst', 'ruby', 'rust', 'scss', 'sql', 'svelte', 'terraform', 'toml',
        'tsx', 'typescript', 'vim', 'vimdoc', 'vue', 'yaml', 'zig',
      },
    },
  },

}

Extend: Defaults

  1. Create lua/config/options.lua and set any Neovim/RafiVim/LazyVim features: (Default values are shown)

    -- Elite-mode (hjkl mode. arrow-keys resize window)
    vim.g.elite_mode = false
    
    -- External file diff program
    vim.g.diffprg = 'bcompare'
    
  2. You can override LazyVim options. For example in lua/plugins/lazyvim.lua:

    return {
      {
        'LazyVim/LazyVim',
        opts = {
          icons = {
            diagnostics = {
              Error = '',
              Warn  = '',
              Info  = '',
            },
            status = {
              diagnostics = {
                error = 'E',
                warn  = 'W',
                info  = 'I',
                hint  = 'H',
              },
            },
          },
        },
      },
    }
    
  3. You can override lazy.nvim (package-manager) global options. Create lua/config/setup.lua and return this function:

    • lazy_opts() β€” override LazyVim setup options

    For example:

    local M = {}
    
    ---@return table
    function M.lazy_opts()
      return {
        -- See https://github.com/folke/lazy.nvim/#%EF%B8%8F-configuration
        concurrency = jit.os:find('Windows') and (vim.uv.available_parallelism() * 2) or nil,
      }
    end
    
    return M
    
  4. You can completely override lazy.nvim setup by creating lua/config/lazy.lua to replace lua/rafi/config/lazy.lua with your own procedure.

Extend: LSP Settings

Override server options with nvim-lspconfig plugin, for example:

{
  'neovim/nvim-lspconfig',
  opts = {
    servers = {
      yamlls = {
        filetypes = { 'yaml', 'yaml.ansible', 'yaml.docker-compose' },
      },
      lua_ls = {
        settings = {
          Lua = {
            workspace = { checkThirdParty = false },
            completion = { callSnippet = 'Replace' },
          },
        },
      },
    },
  }
}

Plugin Highlights

  • Plugin management with cache and lazy loading for speed
  • Auto-completion with Language-Server Protocol (LSP)
  • Project-aware tabline
  • Extensive syntax highlighting with nvim-treesitter.

Note that 95% of the plugins are lazy-loaded.

Plugins Included

List of plugins (πŸ”Ž Click to expand/collapse)

Completion & Code-Analysis

NameDescription
neovim/nvim-lspconfigQuickstart configurations for the Nvim LSP client
mason-org/mason.nvimPortable package manager for Neovim
mason-org/mason-lspconfig.nvimMason extension for easier lspconfig integration
stevearc/conform.nvimLightweight yet powerful formatter plugin
mfussenegger/nvim-lintAsynchronous linter plugin

Editor Plugins

NameDescription
folke/lazy.nvimModern plugin manager for Neovim
nmac427/guess-indent.nvimAutomatic indentation style detection
tweekmonster/helpful.vimDisplay vim version numbers in docs
lambdalisue/suda.vimAn alternative sudo for Vim and Neovim
folke/persistence.nvimSimple lua plugin for automated session management
mbbill/undotreeUltimate undo history visualizer
folke/flash.nvimSearch labels, enhanced character motions
folke/todo-comments.nvimHighlight, list and search todo comments in your projects
folke/trouble.nvimPretty lists to help you solve all code diagnostics
[hedyhli/outline.nvim]Code outline sidebar powered by LSP
s1n7ax/nvim-window-pickerFancy Window picker
dnlhc/glance.nvimPretty window for navigating LSP locations
MagicDuck/grug-far.nvimSearch/replace in multiple files

Coding Plugins

NameDescription
rafamadriz/friendly-snippetsPreconfigured snippets for different languages
nvim-mini/mini.pairsAutomatically manage character pairs
nvim-mini/mini.surroundFast and feature-rich surround actions
JoosepAlviste/nvim-ts-context-commentstringSet the commentstring based on the cursor location
numToStr/Comment.nvimPowerful line and block-wise commenting
nvim-mini/mini.splitjoinSplit and join arguments
nvim-mini/mini.trailspaceTrailing whitespace highlight and remove
AndrewRadev/linediff.vimPerform diffs on blocks of code
nvim-mini/mini.aiExtend and create a/i textobjects
folke/lazydev.nvimFaster LuaLS setup
Bilal2453/luvit-metaManage libuv types with lazy

Colorscheme Plugins

NameDescription
rafi/theme-loader.nvimUse last-used colorscheme
rafi/neo-hybrid.vimModern dark colorscheme, hybrid improved
rafi/awesome-colorschemesAwesome color-schemes

Git Plugins

NameDescription
lewis6991/gitsigns.nvimGit signs written in pure lua
sindrets/diffview.nvimTabpage interface for cycling through diffs
NeogitOrg/neogitMagit clone for Neovim
FabijanZulj/blame.nvimGit blame visualizer
rhysd/committia.vimPleasant editing on Git commit messages

Misc Plugins

NameDescription
folke/snacks.nvimCollection of small QoL plugins
hoob3rt/lualine.nvimStatusline plugin written in pure lua
nvim-neo-tree/neo-tree.nvimFile explorer written in Lua
nvim-telescope/telescope.nvimFind, Filter, Preview, Pick. All lua.
jvgrootveld/telescope-zoxideTelescope extension for Zoxide
rafi/telescope-thesaurus.nvimBrowse synonyms for a word
nvim-lua/plenary.nvimLua functions library

Treesitter & Syntax

NameDescription
nvim-treesitter/nvim-treesitterNvim Treesitter configurations and abstraction layer
nvim-treesitter/nvim-treesitter-textobjectsTextobjects using treesitter queries
windwp/nvim-ts-autotagUse treesitter to auto close and auto rename html tag
andymass/vim-matchupModern matchit and matchparen
iloginow/vim-stylusBetter vim plugin for stylus
mustache/vim-mustache-handlebarsMustache and handlebars syntax
lifepillar/pgsql.vimPostgreSQL syntax and indent
MTDL9/vim-log-highlightingSyntax highlighting for generic log files
reasonml-editor/vim-reason-plusReason syntax and indent

UI Plugins

NameDescription
nvim-mini/mini.iconsIcon provider
MunifTanjim/nui.nvimUI Component Library
stevearc/dressing.nvimImprove the default vim-ui interfaces
akinsho/bufferline.nvimSnazzy tab/bufferline
folke/noice.nvimReplaces the UI for messages, cmdline and the popupmenu
SmiteshP/nvim-navicShows your current code context in winbar/statusline
chentau/marks.nvimInteracting with and manipulating marks
lukas-reineke/indent-blankline.nvimVisually display indent levels
nvim-mini/mini.indentscopeVisualize and operate on indent scope
folke/which-key.nvimCreate key bindings that stick
tenxsoydev/tabs-vs-spaces.nvimHint and fix deviating indentation
t9md/vim-quickhlHighlight words quickly

Extra Plugins

List of extras (πŸ”Ž Click to expand/collapse)

You can view all LazyVim's extras at lazyvim.org/extras.

These plugins aren't enabled by default. You'll have to install them using :LazyExtras and installing with x. (Or import them using specs) See Extend: Plugins on how to add plugins and examples.

Following are extra-extras available with Rafi's Neovim on-top of LazyVim's:

Extra Plugins: Coding

Spec: rafi.plugins.extras.coding.<name>

NameRepositoryDescription
alignnvim-mini/mini.alignAlign text interactively
chainsawchrisgrieser/nvim-chainsawCreate log statements on the fly
debugprint.luaandrewferrier/debugprint.nvimEasily add debug print lines
editorconfigsgur/vim-editorconfigEditorConfig plugin written entirely in Vimscript
emmetmattn/emmet-vimProvides support for expanding abbreviations alΓ‘ emmet
nvim-cmphrsh7th/nvim-cmpCompletion plugin
sandwichmachakann/vim-sandwichSearch, select, and edit sandwich text objects

Extra Plugins: Colorscheme

Spec: rafi.plugins.extras.colorscheme.<name>

NameRepositoryDescription
bambooribru17/bamboo.nvimWarm green theme
cyberdreamscottmckendry/cyberdream.nvimHigh-contrast, futuristic & vibrant theme
githubprojekt0n/github-nvim-themeGitHub's theme
kanagawarebelot/kanagawa.nvimInspired by the colors of the famous painting by Katsushika Hokusai
monokai-proloctvl842/monokai-pro.nvimMonokai Pro theme with multiple filters

Extra Plugins: Editor

Spec: rafi.plugins.extras.editor.<name>

NameRepositoryDescription
anyjumppechorin/any-jump.vimJump to any definition and references without overhead
flybufglepnir/flybuf.nvimList buffers in a float window
harpoon2ThePrimeagen/harpoonMarks for navigating your project
mini-visitsnvim-mini/mini.visitsTrack and reuse file system visits
restrest-nvim/rest.nvimFast Neovim http client written in Lua
sidebarsidebar-nvim/sidebar.nvimGeneric and modular lua sidebar
spectrenvim-pack/nvim-spectreFind and replace
ufokevinhwang91/nvim-ufoMake folds look modern and keep a high performance

Extra Plugins: Git

Spec: rafi.plugins.extras.git.<name>

NameRepositoryDescription
cmp-gitpetertriho/cmp-gitGit source for nvim-cmp
fugitivetpope/vim-fugitiveGit client, including junegunn/gv.vim

Extra Plugins: Lang

Spec: rafi.plugins.extras.lang.<name>

NameDescription
ansibleimports lazyvim.plugins.extras.lang.ansible, add syntax and pearofducks/ansible-vim
goimports lazyvim.plugins.extras.lang.go, add tools, patterns, etc.
helmimports lazyvim.plugins.extras.lang.helm, add filetype patterns
kubernetesimports lazyvim.plugins.extras.lang.yaml, add filetype patterns and ramilito/kubectl.nvim
markdownimports lazyvim.plugins.extras.lang.markdown, disable headlines, add mzlogin/vim-markdown-toc
pythonimports lazyvim.plugins.extras.lang.python, add syntax and filetype patterns
tmuxsyntax, completion andersevenrud/cmp-tmux, keymaps christoomey/tmux-navigator

Extra Plugins: LSP

Spec: rafi.plugins.extras.lsp.<name>

KeyNameDescription
gtdhrsh7th/nvim-gtdLSP's go-to definition plugin
lightbulbkosayoda/nvim-lightbulbVSCode πŸ’‘ for neovim's built-in LSP
yaml-companionyaml-companion.nvimGet, set and autodetect YAML schemas in your buffers

Extra Plugins: Org

Spec: rafi.plugins.extras.org.<name>

KeyNameDescription
calendaritchyny/calendar.vimCalendar application
kiwiserenevoid/kiwi.nvimStripped down VimWiki
telekastenrenerocksai/telekasten.nvimManage text-based, markdown zettelkasten or wiki with telescope
vimwikivimwiki/vimwikiPersonal Wiki for Vim
zk-nvimzk-org/zk-nvimExtension for the zk plain text note-taking assistant

Extra Plugins: Treesitter

Spec: rafi.plugins.extras.treesitter.<name>

KeyNameDescription
endwiseRRethy/nvim-treesitter-endwiseWisely add "end" in various filetypes
treesjWansmer/treesjSplitting and joining blocks of code

Extra Plugins: UI

Spec: rafi.plugins.extras.ui.<name>

KeyNameDescription
alphagoolord/alpha-nvimFast and fully programmable greeter
barbecueutilyre/barbecue.nvimVS Code like winbar
bookmarkstomasky/bookmarks.nvimBookmarks plugin with global file store
bqfkevinhwang91/nvim-bqfBetter quickfix window
cccuga-rosa/ccc.nvimSuper powerful color picker/colorizer plugin
cursorworditchyny/cursorwordUnderlines word under cursor
cybughillb/cybu.nvimCycle buffers with a customizable notification window
deadcolumnBekaboo/deadcolumn.nvimShow colorcolumn dynamically
goto-previewrmagatti/goto-previewPreview definitions using floating windows
headlineslukas-reineke/headlines.nvimAdds horizontal highlights for headlines and code background.
illuminateRRethy/vim-illuminateHighlights other uses of the word under the cursor
inclineb0o/incline.nvimFloating statuslines
markschentoast/marks.nvimInteracting with and manipulating marks
mini-cluenvim-mini/mini.clueShow next key clues
mini-mapnvim-mini/mini.mapWindow with buffer text overview, scrollbar and highlights
quickerstevearc/quicker.nvimImproved quickfix UI and workflow
symbols-outlinesimrat39/symbols-outline.nvimTree like view for symbols using LSP

LazyVim Extras

LazyVim is imported in specs (see lua/rafi/config/lazy.lua) Therefore, you can import any of the "Extras" plugins defined at LazyVim/LazyVim and documented in lazyvim.org/extras.

Use Spacemx or :LazyExtras to install them.

These are only highlights:

  • ai.copilot
  • coding.neogen
  • coding.yanky
  • dap.core
  • test.core
  • util.mini-hipatterns
  • lang.docker
  • lang.json
  • lang.markdown
  • lang.svelte
  • lang.terraform
  • And much more…

Custom Key-mappings

Note that,

  • Leader key set as Space
  • Local-Leader key set as ; and used for navigation and search (Telescope/Snacks/FZF and Neo-tree)
  • Disable ← ↑ β†’ ↓ in normal mode by enabling vim.g.elite_mode.
Key-mappings (πŸ”Ž Click to expand/collapse)

Legend: | Ⓝormal | β“‹isual | β“ˆelect | β’Ύnsert | β“„perator | β’Έommand |

Picker

(Telescope/Snacks/FZF)

KeyModeAction
Space ;ⓃSelect picker
;rⓃResume previous picker
;pⓃProjects
;fⓃFile
;FⓃFile (cwd)
;gⓃGrep search
;GⓃGrep search (cwd)
;bⓃSwitch buffers
;hⓃHelp pages
;HⓃHighlights
;jⓃJumplist
;mⓃJump to mark
;MⓃMan pages
;oⓃOptions
;tⓃGoto symbol
;TⓃGoto symbol (workspace)
;vⓃ β“‹Registers
;sⓃSessions
;uⓃSpelling suggestions
;xⓃRecent
;XⓃRecent (cwd)
;zⓃZoxide directories
;;ⓃCommand history
;:ⓃCommands
;/ⓃSearch history
;ddⓃLSP definitions
;diⓃLSP implementations
;drⓃLSP references
;daⓃ β“‹LSP code actions
Space /ⓃBuffer fuzzy find
Space gsⓃGit status
Space grⓃGit branches
Space ghⓃGit stashes
Space gFⓃFind files matching word under cursor
Space ggⓃ β“‹Grep word/selection
Space gGⓃ β“‹Grep word/selection (cwd)
Space scⓃColorschemes
Space sdⓃDocument diagnostics
Space sDⓃWorkspace diagnostics
Space shⓃHelp tags
Space skⓃKey-maps
Space smⓃMan pages
Space ssⓃLSP document symbols
Space sSⓃLSP workspace symbols
Space stⓃTodo list
Space sTⓃTodo/Fix/Fixme list
Space swⓃGrep string
Β 
;iⓃ(Snacks only) Icons
;wⓃ(Telescope only) Notes
;nⓃ(Telescope only) Plugin directories
;kⓃ(Telescope only) Thesaurus
Β 
Within Picker windowΒ 
?ⓃKeymaps help screen
Ctrl+SpaceⓃMove from none fuzzy search to fuzzy
jj or Escapeβ’ΎLeave Insert mode
iⓃEnter Insert mode (filter input)
q or EscapeⓃExit
Tab or Shift+TabⓃ β’ΎNext/previous candidate
Ctrl+d/uⓃ β’ΎScroll down/upwards
Ctrl+f/bⓃ β’ΎScroll preview down/upwards
Ctrl+j/kⓃ β’ΎScroll preview vertically
Ctrl+h/lⓃ β’ΎScroll preview horizontally
J or KⓃSelect candidates up/downwards
stⓃOpen in a new tab
sgⓃOpen in a vertical split
svⓃOpen in a split
*ⓃToggle selection
uⓃDrop all
wⓃSmart send to quickfix list
eⓃSend to quickfix list
Ctrl+qβ’ΎSend to quickfix list
ddⓃDelete entry (buffer list)
!ⓃEdit in command line

Toggle Features

KeyModeAction
Space dphⓃToggle profiler highlights
Space dppⓃToggle profiler
Space uaⓃToggle animation
Space uAⓃToggle tabline
Space ubⓃToggle background dark/light
Space ucⓃToggle conceal level
Space uCⓃColorschemes
Space udⓃToggle buffer diagnostics
Space uDⓃToggle text dim
Space ufⓃToggle format on Save
Space uFⓃToggle format on Save (Global)
Space ugⓃToggle indentation lines
Space uGⓃToggle git signs
Space uhⓃToggle inlay-hints
Space uiⓃInspect position
Space uIⓃInspect tree
Space ulⓃToggle line numbers
Space uLⓃToggle relative line numbers
Space umⓃToggle markdown render
Space unⓃDismiss all notifications
Space upⓃDisable auto-pairs
Space urⓃRedraw, clear hlsearch, and diff update
Space usⓃToggle spell-checker
Space uSⓃToggle smooth scroll
Space uTⓃToggle tree-sitter
Space uwⓃToggle wrap
Space uzⓃToggle distraction-free zen writing
Space uZⓃToggle window zoom
KeyModeActionPlugin or Mapping
j / kⓃ β“‹Cursor moves through display-linesg j/k
]i / [iⓃ β“‹Jump to scope edgesfolke/snacks.nvim
gh / glⓃ β“‹Easier line-wise movementg^ g$
zl / zhⓃScroll horizontally and vertically widerz4 l/h
Ctrl+jⓃMove to split below<C-w>j or christoomey/tmux-navigator
Ctrl+kⓃMove to upper split<C-w>k or christoomey/tmux-navigator
Ctrl+hⓃMove to left split<C-w>h or christoomey/tmux-navigator
Ctrl+lⓃMove to right split<C-w>l or christoomey/tmux-navigator
ReturnⓃToggle fold under cursorza
Shift+ReturnⓃFocus the current fold by closing all otherszMzv
Ctrl+fβ’ΈMove cursor forwards in commandRight
Ctrl+bβ’ΈMove cursor backwards in commandLeft
Ctrl+hβ’ΈMove cursor to the beginning in commandHome
Ctrl+lβ’ΈMove cursor to the end in commandEnd
Ctrl+TabⓃGo to next tab:tabnext
Ctrl+ShiftTabⓃGo to previous tab:tabprevious
Alt+j or ]ⓃGo to next tab:tabnext
Alt+k or [ⓃGo to previous tab:tabprevious
Alt+{ⓃMove tab backward:-tabmove
Alt+}ⓃMove tab forward:+tabmove

Selection

KeyModeActionPlugin or Mapping
Space+SpaceⓃ β“‹Toggle visual-line modeV / Escape
Ctrl+Space / Vβ“‹Increment/shrink selectionnvim-treesitter
vspⓃSelect last pasteconfig/keymaps.lua
sgβ“‹Replace within selected areaconfig/keymaps.lua
Ctrl+rβ“‹Replace selection with step-by-step confirmationconfig/keymaps.lua
> / <β“‹Indent and re-selectconfig/keymaps.lua
Tab / Shift+Tabβ“‹Indent and re-selectconfig/keymaps.lua
I / gI / Aβ“‹Force blockwise operationconfig/keymaps.lua

Jump To

KeyModeActionPlugin or Mapping
], or [,ⓃNext/previous parameterakinsho/bufferline.nvim
]q or [qⓃNext/previous on quick-fix:cnext / :cprev
]a or [aⓃNext/previous on location-list:lnext / :lprev
]d or [dⓃNext/previous diagnosticsconfig/keymaps.lua
]e or [eⓃNext/previous errorconfig/keymaps.lua
]w or [wⓃNext/previous warningconfig/keymaps.lua
]b or [bⓃNext/previous bufferakinsho/bufferline.nvim
]f or [fⓃNext/previous function startnvim-mini/mini.ai
]F or [FⓃNext/previous function endnvim-mini/mini.ai
]c or [cⓃNext/previous class startnvim-mini/mini.ai
]C or [CⓃNext/previous class endnvim-mini/mini.ai
]m or [mⓃNext/previous method startnvim-mini/mini.ai
]M or [MⓃNext/previous method endnvim-mini/mini.ai
]g or [gⓃNext/previous Git hunklewis6991/gitsigns.nvim
]i or [iⓃNext/previous indent scopenvim-mini/mini.indentscope
]t or [tⓃNext/previous TODOfolke/todo-comments.nvim
]z or [zⓃNext/previous whitespace errorconfig/keymaps.lua

Buffers

KeyModeActionPlugin or Mapping
Space+bdⓃDelete bufferfolke/snacks.nvim

Clipboard

KeyModeActionPlugin or Mapping
p or Pβ“‹Paste without yank:let @+=@0
Space+yⓃCopy relative file-path to clipboardconfig/keymaps.lua
Space+YⓃCopy absolute file-path to clipboardconfig/keymaps.lua

Auto-Completion

KeyModeActionPlugin or Mapping
Tab / Shift-Tabβ’Ύ β“ˆNavigate/open completion-menunvim-cmp
Tab / Shift-Tabβ’Ύ β“ˆNavigate snippet placeholders[L3MON4D3/LuaSnip]
Ctrl+Spaceβ’ΎOpen completion menunvim-cmp
Enterβ’ΎSelect completion item or expand snippetnvim-cmp
Shift+Enterβ’ΎSelect and replace with completion itemnvim-cmp
Ctrl+n/pβ’ΎMovement in completion pop-upnvim-cmp
Ctrl+f/bβ’ΎScroll documentationnvim-cmp
Ctrl+d/uβ’ΎScroll candidatesnvim-cmp
Ctrl+eβ’ΎAbort selection and close pop-upnvim-cmp
Ctrl+lβ’ΎExpand snippet at cursor[L3MON4D3/LuaSnip]
Ctrl+cβ’ΎClose completion menunvim-cmp

LSP

KeyModeActionPlugin or Mapping
grⓃGo to referencesplugins/lsp/keymaps.lua
gRⓃList references with Troublefolke/trouble.nvim
gdⓃGo to definitionplugins/lsp/keymaps.lua
gDⓃGo to declarationplugins/lsp/keymaps.lua
gIⓃGo to implementationplugins/lsp/keymaps.lua
gyⓃGo to type definitionplugins/lsp/keymaps.lua
KⓃShow hover help or collapsed foldplugins/lsp/keymaps.lua
gKⓃShow signature helpplugins/lsp/keymaps.lua
Space crⓃRenameplugins/lsp/keymaps.lua
Space ceⓃOpen diagnostics windowplugins/lsp/keymaps.lua
Space csⓃFormatter menu selectionplugins/lsp/keymaps.lua
Space caⓃ β“‹Code actionplugins/lsp/keymaps.lua
Space cAⓃSource actionplugins/lsp/keymaps.lua
Space cliⓃLSP incoming calls[plugins/lsp.lua]
Space cloⓃLSP outgoing calls[plugins/lsp.lua]
Space ciwaⓃAdd workspace folder[plugins/lsp.lua]
Space ciwrⓃRemove workspace folder[plugins/lsp.lua]
Space ciwlⓃList workspace folders[plugins/lsp.lua]
Space cgdⓃGlance definitionsdnlhc/glance.nvim
Space cgrⓃGlance referencesdnlhc/glance.nvim
Space cgyⓃGlance type definitionsdnlhc/glance.nvim
Space cgiⓃGlance implementationsdnlhc/glance.nvim
Space cguⓃGlance resumednlhc/glance.nvim

Diagnostics

KeyModeActionPlugin or Mapping
Space udⓃToggle buffer diagnosticsplugins/lsp/keymaps.lua
Space xtⓃList TODO with Troublefolke/todo-comments.nvim
Space xTⓃList TODO/FIXME with Troublefolke/todo-comments.nvim
Space stⓃSelect TODO with Telescopefolke/todo-comments.nvim
Space sTⓃSelect TODO/FIXME with Telescopefolke/todo-comments.nvim
Space xxⓃToggle Troublefolke/trouble.nvim
Space xdⓃToggle Trouble documentfolke/trouble.nvim
Space xwⓃToggle Trouble workspacefolke/trouble.nvim
Space xqⓃToggle Quickfix via Troublefolke/trouble.nvim
Space xlⓃToggle Locationlist via Troublefolke/trouble.nvim

Coding

KeyModeActionPlugin or Mapping
Ctrl+qⓃStart recording macroq
Space cfⓃ β“‹Format[plugins/formatting.lua]
Space cFⓃ β“‹Format injected langs[plugins/formatting.lua]
Space ccⓃGenerate doc annotations[danymat/neogen]
Shift+Returnβ’ΎStart new line from any cursor position<C-o>o
] SpaceⓃAdd new line belowo<Esc>
[ SpaceⓃAdd new line aboveO<Esc>
gcⓃ β“‹Comment prefixnumToStr/Comment.nvim
gccⓃ β“‹Toggle commentsnumToStr/Comment.nvim
Space+j or kⓃ β“‹Move lines down/up:m …
Space+vⓃ β“‹Toggle line-wise commentsnumToStr/Comment.nvim
Space+VⓃ β“‹Toggle block-wise commentsnumToStr/Comment.nvim
Space+ddⓃ β“‹Duplicate line or selectionconfig/keymaps.lua
Space+cwⓃRemove all spaces at EOLnvim-mini/mini.trailspace
Space+cidⓃLazyDevfolke/lazydev.nvim
Space+cifⓃLazyFormatterInfo[LazyVim/LazyVim]
Space+cirⓃLazyRoot[LazyVim/LazyVim]
sj / skⓃJoin/split argumentsnvim-mini/mini.splitjoin

Search, Substitute, Diff

KeyModeActionPlugin or Mapping
* / #Ⓝ β“‹Search partial wordsg* / g#
g* / g#Ⓝ β“‹Search whole-word forward/backward* / #
Ctrl+cⓃChange inner wordciw
EscapeⓃClear search highlight:nohlsearch
BackspaceⓃMatch bracket%
Space+bfⓃDiff current windows in tabwindo diffthis
Space+bFⓃExternal diff!vim.g.diffprg % #
ssⓃ β“‹ β“„Flash jumpfolke/flash.nvim
SⓃ β“‹ β“„Flash treesitterfolke/flash.nvim
rβ“„Flash remotefolke/flash.nvim
Rβ“‹ β“„Flash treesitter searchfolke/flash.nvim
Ctrl+sβ’ΈToggle flash in search inputfolke/flash.nvim

Command & History

KeyModeActionPlugin or Mapping
g!ⓃRead vim command into buffer:put=execute('⌴')
Ctrl+n / pβ’ΈSwitch history search pairs↓ / ↑
↓ / ↑ⒸSwitch history search pairsCtrl n/p

File Operations

KeyModeActionPlugin or Mapping
Space+cdⓃSwitch tab to the directory of current buffer:tcd %:p:h
Space+w or M+sⓃWrite buffer to file:write
Ctrl+sⓃ β“‹ β’ΈWrite buffer to file:write

Window Management

KeyModeActionPlugin or Mapping
Space qqⓃQuit all and exit:quitall
s]ⓃRotate window placementC-w x
spⓃChoose a window to edits1n7ax/nvim-window-picker
swⓃSwitch editing window with selecteds1n7ax/nvim-window-picker
svⓃHorizontal split:split
sgⓃVertical split:vsplit
stⓃOpen new tab:tabnew
soⓃClose other windows:only
sbⓃPrevious buffer:b#
scⓃClose current buffer:close
sdⓃDelete buffer:bdelete
sqⓃQuit window (if last window, quit nvim):quit
sxⓃDelete buffer, leave blank window:enew β”‚ bdelete
szⓃToggle window zoom:vertical resize β”‚ resize
shⓃToggle colorscheme background=dark/light:set background …

Plugins

KeyModeActionPlugin or Mapping
;+cⓃOpen context-menulua/rafi/util/contextmenu.lua
gCtrl+oⓃNavigate to previous file on jumplistutil/edit.lua
gCtrl+iⓃNavigate to next file on jumplistutil/edit.lua
Ctrl+/ⓃToggle terminalfolke/snacks.nvim
Space lⓃOpen Lazyfolke/lazy.nvim
Space oⓃOpen Outline side[hedyhli/outline.nvim]
Space ?ⓃOpen the macOS dictionary on current word:!open dict://
Space cpⓃToggle Markdown previewiamcco/markdown-preview.nvim
Space mcⓃOpen color-pickeruga-rosa/ccc.nvim
Space ttⓃOpen terminal (root dir)config/keymaps.lua
Space tTⓃOpen terminal (cwd)config/keymaps.lua
Space gtⓃOpen Lazygit (root dir)config/keymaps.lua
Space gTⓃOpen Lazygit (cwd)config/keymaps.lua
Space gFⓃOpen Lazygit on current file historyconfig/keymaps.lua
Space glⓃOpen Lazygit logconfig/keymaps.lua
Space gLⓃOpen Lazygit log (cwd)config/keymaps.lua
Space gbⓃGit blameFabijanZulj/blame.nvim
Space gBⓃGit blame in windowFabijanZulj/blame.nvim
Space gmⓃReveal commit under cursorconfig/keymaps.lua
Space goⓃ β“‹Open source-code URL in browserconfig/keymaps.lua
Space gYⓃ β“‹Copy source-code URLconfig/keymaps.lua
Space guⓃOpen undo-treembbill/undotree
Space mgⓃOpen NeogitNeogitOrg/neogit
Space mlⓃAppend modeline to end of bufferconfig/keymaps.lua
Space mdaβ“‹Sequentially mark region for diffAndrewRadev/linediff.vim
Space mdfβ“‹Mark region for diff and compare if more than oneAndrewRadev/linediff.vim
Space mdsⓃShows the comparison for all marked regionsAndrewRadev/linediff.vim
Space mdrⓃRemoves the signs denoting the diff regionsAndrewRadev/linediff.vim
Space mhⓃOpen HTTP Rest UIrest-nvim/rest.nvim
Space mtⓃ β“‹Toggle highlighted wordt9md/vim-quickhl
Space moⓃUpdate Markdown TOCmzlogin/vim-markdown-toc

Plugin: Mini.Surround

See nvim-mini/mini.surround for more mappings and usage information.

KeyModeAction
sa & movementⓃ β“‹Add surrounding
cs & movementⓃReplace surrounding
ds & movementⓃDelete surrounding
gzf & movementⓃFind surrounding (to the right)
gzF & movementⓃFind surrounding (to the left)
gzh & movementⓃHighlight surrounding
gzn & movementⓃUpdate neighbor lines

Plugin: Gitsigns

See lewis6991/gitsigns.nvim for more mappings and usage information.

KeyModeAction
]g or ]gⓃNext/previous Git hunk
gsⓃPreview hunk
Space hpⓃPreview hunk inline
Space hbⓃBlame line
Space hsⓃ β“‹Stage hunk
Space hrⓃ β“‹Reset hunk
Space huⓃUndo stage hunk
Space hSⓃStage buffer
Space hRⓃReset buffer
Space hdⓃDiff against the index
Space hDⓃDiff against the last commit
Space hwⓃToggle word diff
Space hlⓃPublish hunks to location-list
Space htbⓃToggle git current line blame
Space htdⓃToggle git deleted
Space htwⓃToggle git word diff
Space htlⓃToggle git line highlight
Space htnⓃToggle git number highlight
Space htsⓃToggle git signs
ihβ“„Select inner hunk operator

Plugin: Diffview

See sindrets/diffview.nvim for more mappings and usage information.

KeyModeAction
Space gdⓃDiff view file history
Space gvⓃDiff view open
Β 
Within diffview "view" windowΒ 
Β 
Tab / Shift+TabⓃSelect next/previous entry
; aⓃFocus file
; eⓃToggle files panel
Β 
Within diffview "file" panelΒ 
Β 
qⓃClose
hⓃPrevious entry
oⓃFocus entry
gfⓃOpen file
sgⓃOpen file in split
stⓃOpen file in new tab
Ctrl+rⓃRefresh files
; eⓃToggle panel
Β 
Within diffview "history" panelΒ 
Β 
qⓃClose diffview
oⓃFocus entry
OⓃShow options

Plugin: Neo-Tree

See nvim-neo-tree/neo-tree.nvim for more mappings and usage information.

KeyModeAction
Space e/feⓃToggle file explorer (root)
Space E/fEⓃToggle file explorer (cwd)
geⓃOpen Git explorer
beⓃOpen Buffer explorer
;aⓃReveal in file explorer
;AⓃReveal in file explorer (cwd)
Β 
Within Neo-Tree windowΒ 
Β 
g?ⓃShow help
qⓃClose window
j or kⓃMove up and down the tree
Tab or Shift+TabⓃNext or previous source
]g or [gⓃJump to next/previous git modified node
lⓃToggle collapse/expand directory or open file
hⓃCollapse directory tree
ReturnⓃSelect window to open file
grⓃGrep in current position
gfⓃFind files in current position
.ⓃSet as root directory
BackspaceⓃChange into parent directory
sv or SⓃOpen file in a horizontal split
sg or sⓃOpen file in a vertical split
st or tⓃOpen file in new tab
pⓃPreview toggle
aⓃCreate new directories and/or files
NⓃCreate new directory
rⓃRename file or directory
ddⓃDelete
c / mⓃCopy/move
y / x / PⓃClipboard copy/cut/paste
!ⓃFilter
DⓃFilter directories
#ⓃFuzzy sorter
FⓃFilter on submit
Ctrl+cⓃClear filter
Ctrl+r or RⓃRefresh
fi / feⓃInclude/exclude
HⓃToggle hidden files
eⓃToggle auto-expand window width
wⓃToggle window width
zⓃCollapse all nodes

Plugin: Marks

See chentau/marks.nvim for more mappings and usage information.

KeyModeAction
m,ⓃSet the next available alphabetical (lowercase) mark
m;ⓃToggle the next available mark at the current line
m a-zⓃSet mark
dm a-zⓃRemove mark
dm-ⓃDelete all marks on the current line
dm<Space>ⓃDelete all marks in the current buffer
m]ⓃMove to next mark
m[ⓃMove to previous mark
m: a-zⓃPreview mark
m/ⓃList marks from all opened buffers

Plugin: Zk

See zk-org/zk-nvim and zk for more mappings and usage information.

KeyModeAction
Space+znⓃAsk for title and create new note
Space+zoⓃBrowse notes sorted by modification time
Space+ztⓃBrowse tags
Space+zfⓃSearch notes
Space+zfβ“‹Search notes with selection
Space+zbⓃShow backlinks
Space+zlⓃShow links