Lean mean Neovim machine, 30-45ms startup time. Works best with Neovim ≥0.10
⚙️ 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
- Screenshot
- Prerequisites
- Install
- Install LSP, DAP, Linters, Formatters
- Recommended Fonts
- Upgrade
- Structure
- Extending
- Plugin Highlights
- Plugins Included
- Extra Plugins
- Custom Key-mappings
- 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+mm - LSP configuration with nvim-lspconfig
- telescope.nvim centric work-flow with lists (try ;+f…)
- Custom context-menu (try it! ;+c)
- Auto-complete extensive setup with nvim-cmp (try Tab or Ctrl+Space in insert-mode)
- 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
Optional, but highly recommended:
- bat (
brew install bat
) - fd (
brew install fd
) - fzf (
brew install fzf
) - ripgrep (
brew install ripgrep
) - zoxide (
brew install zoxide
)
-
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
-
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. -
Inside Neovim, run
:LazyExtras
and use x to install extras.
Enjoy! 😄
Use :Mason
(or Space+mm) to install and manage LSP
servers, DAP servers, linters and formatters. See :h mason.nvim
and
williamboman/mason.nvim for more information.
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
- Pragmata Pro (€19 — €1,990): My preferred font
- Any of the Nerd Fonts
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
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
- after/ — Language specific custom settings and plugins.
- lua/ — Lua configurations
config/
— Custom user configurationplugins/
— Custom user plugins (orlua/plugins.lua
)- rafi/
- config/ — Neovim configurations
- autocmd.lua — Auto-commands
- init.lua — Initialization
- keymaps.lua — Key-mappings
- lazy.lua — Entry-point initialization
- options.lua — Editor settings
- plugins/ — Plugins and configurations
- util/ — Utility library
- config/ — Neovim configurations
- snippets/ — Personal code snippets
Fork this repository and create a directory
lua/config
with one or more of these files: (Optional)
lua/config/autocmds.lua
— Custom auto-commandslua/config/options.lua
— Custom optionslua/config/keymaps.lua
— Custom key-mappingslua/config/setup.lua
— Override config, see extend defaults.
Adding plugins or override existing options:
lua/plugins/*.lua
orlua/plugins.lua
— Plugins (See lazy.nvim specs for syntax)
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.dap.core",
"lazyvim.plugins.extras.dap.nlua",
"lazyvim.plugins.extras.lang.docker",
"lazyvim.plugins.extras.lang.json",
"lazyvim.plugins.extras.lang.typescript",
"lazyvim.plugins.extras.lang.yaml",
"lazyvim.plugins.extras.test.core",
"rafi.plugins.extras.coding.align",
"rafi.plugins.extras.editor.harpoon2",
"rafi.plugins.extras.git.cmp-git",
"rafi.plugins.extras.lang.ansible",
"rafi.plugins.extras.lang.go",
"rafi.plugins.extras.lang.helm",
"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', 'jsonc', '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',
},
},
},
}
-
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' -- Auto format on-save vim.g.autoformat = false -- Snacks animations vim.g.snacks_animate = false
-
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', }, }, }, }, }, }
-
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
-
You can completely override lazy.nvim setup by creating
lua/config/lazy.lua
to replacelua/rafi/config/lazy.lua
with your own procedure.
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 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.
List of plugins (🔎 Click to expand/collapse)
Name | Description |
---|---|
neovim/nvim-lspconfig | Quickstart configurations for the Nvim LSP client |
williamboman/mason.nvim | Portable package manager for Neovim |
williamboman/mason-lspconfig.nvim | Mason extension for easier lspconfig integration |
stevearc/conform.nvim | Lightweight yet powerful formatter plugin |
mfussenegger/nvim-lint | Asynchronous linter plugin |
Name | Description |
---|---|
folke/lazy.nvim | Modern plugin manager for Neovim |
nmac427/guess-indent.nvim | Automatic indentation style detection |
tweekmonster/helpful.vim | Display vim version numbers in docs |
lambdalisue/suda.vim | An alternative sudo for Vim and Neovim |
folke/persistence.nvim | Simple lua plugin for automated session management |
mbbill/undotree | Ultimate undo history visualizer |
folke/flash.nvim | Search labels, enhanced character motions |
folke/todo-comments.nvim | Highlight, list and search todo comments in your projects |
folke/trouble.nvim | Pretty lists to help you solve all code diagnostics |
[hedyhli/outline.nvim] | Code outline sidebar powered by LSP |
s1n7ax/nvim-window-picker | Fancy Window picker |
dnlhc/glance.nvim | Pretty window for navigating LSP locations |
MagicDuck/grug-far.nvim | Search/replace in multiple files |
Name | Description |
---|---|
hrsh7th/nvim-cmp | Completion plugin for neovim written in Lua |
hrsh7th/cmp-nvim-lsp | nvim-cmp source for neovim builtin LSP client |
hrsh7th/cmp-buffer | nvim-cmp source for buffer words |
hrsh7th/cmp-path | nvim-cmp source for path |
hrsh7th/cmp-emoji | nvim-cmp source for emoji |
rafamadriz/friendly-snippets | Preconfigured snippets for different languages |
echasnovski/mini.pairs | Automatically manage character pairs |
echasnovski/mini.surround | Fast and feature-rich surround actions |
JoosepAlviste/nvim-ts-context-commentstring | Set the commentstring based on the cursor location |
numToStr/Comment.nvim | Powerful line and block-wise commenting |
echasnovski/mini.splitjoin | Split and join arguments |
echasnovski/mini.trailspace | Trailing whitespace highlight and remove |
AndrewRadev/linediff.vim | Perform diffs on blocks of code |
echasnovski/mini.ai | Extend and create a /i textobjects |
folke/lazydev.nvim | Faster LuaLS setup |
Bilal2453/luvit-meta | Manage libuv types with lazy |
Name | Description |
---|---|
rafi/theme-loader.nvim | Use last-used colorscheme |
rafi/neo-hybrid.vim | Modern dark colorscheme, hybrid improved |
rafi/awesome-colorschemes | Awesome color-schemes |
Name | Description |
---|---|
lewis6991/gitsigns.nvim | Git signs written in pure lua |
sindrets/diffview.nvim | Tabpage interface for cycling through diffs |
NeogitOrg/neogit | Magit clone for Neovim |
FabijanZulj/blame.nvim | Git blame visualizer |
rhysd/committia.vim | Pleasant editing on Git commit messages |
Name | Description |
---|---|
folke/snacks.nvim | Collection of small QoL plugins |
hoob3rt/lualine.nvim | Statusline plugin written in pure lua |
nvim-neo-tree/neo-tree.nvim | File explorer written in Lua |
nvim-telescope/telescope.nvim | Find, Filter, Preview, Pick. All lua. |
jvgrootveld/telescope-zoxide | Telescope extension for Zoxide |
rafi/telescope-thesaurus.nvim | Browse synonyms for a word |
nvim-lua/plenary.nvim | Lua functions library |
Name | Description |
---|---|
nvim-treesitter/nvim-treesitter | Nvim Treesitter configurations and abstraction layer |
nvim-treesitter/nvim-treesitter-textobjects | Textobjects using treesitter queries |
windwp/nvim-ts-autotag | Use treesitter to auto close and auto rename html tag |
andymass/vim-matchup | Modern matchit and matchparen |
iloginow/vim-stylus | Better vim plugin for stylus |
mustache/vim-mustache-handlebars | Mustache and handlebars syntax |
lifepillar/pgsql.vim | PostgreSQL syntax and indent |
MTDL9/vim-log-highlighting | Syntax highlighting for generic log files |
reasonml-editor/vim-reason-plus | Reason syntax and indent |
Name | Description |
---|---|
echasnovski/mini.icons | Icon provider |
MunifTanjim/nui.nvim | UI Component Library |
stevearc/dressing.nvim | Improve the default vim-ui interfaces |
akinsho/bufferline.nvim | Snazzy tab/bufferline |
folke/noice.nvim | Replaces the UI for messages, cmdline and the popupmenu |
SmiteshP/nvim-navic | Shows your current code context in winbar/statusline |
chentau/marks.nvim | Interacting with and manipulating marks |
lukas-reineke/indent-blankline.nvim | Visually display indent levels |
echasnovski/mini.indentscope | Visualize and operate on indent scope |
folke/which-key.nvim | Create key bindings that stick |
tenxsoydev/tabs-vs-spaces.nvim | Hint and fix deviating indentation |
t9md/vim-quickhl | Highlight words quickly |
List of extras (🔎 Click to expand/collapse)
You can view all LazyVim's extras at www.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:
Spec: rafi.plugins.extras.coding.<name>
Name | Repository | Description |
---|---|---|
align |
echasnovski/mini.align | Align text interactively |
chainsaw |
chrisgrieser/nvim-chainsaw | Create log statements on the fly |
editorconfig |
sgur/vim-editorconfig | EditorConfig plugin written entirely in Vimscript |
emmet |
mattn/emmet-vim | Provides support for expanding abbreviations alá emmet |
luasnip |
L3MON4D3/LuaSnip saadparwaiz1/cmp_luasnip | Snippet Engine and cmp source |
neogen |
danymat/neogen | Annotation generator |
sandwich |
machakann/vim-sandwich | Search, select, and edit sandwich text objects |
Spec: rafi.plugins.extras.colorscheme.<name>
Name | Repository | Description |
---|---|---|
nordic |
AlexvZyl/nordic.nvim | Nord for Neovim, but warmer and darker |
tokyonight |
folke/tokyonight.nvim | Clean, dark Neovim theme |
kanagawa |
rebelot/kanagawa.nvim | Inspired by the colors of the famous painting by Katsushika Hokusai |
onedarkpro |
olimorris/onedarkpro.nvim | OneDarkPro theme |
nightfox |
EdenEast/nightfox.nvim | Highly customizable theme |
oxocarbon |
nyoom-engineering/oxocarbon.nvim | Dark and light theme inspired by IBM Carbon |
bamboo |
ribru17/bamboo.nvim | Warm green theme |
catppuccin |
catppuccin/nvim | Soothing pastel theme |
Spec: rafi.plugins.extras.editor.<name>
Name | Repository | Description |
---|---|---|
anyjump |
pechorin/any-jump.vim | Jump to any definition and references without overhead |
flybuf |
glepnir/flybuf.nvim | List buffers in a float window |
harpoon |
ThePrimeagen/harpoon | Marks for navigating your project |
mini-visits |
echasnovski/mini.visits | Track and reuse file system visits |
rest |
rest-nvim/rest.nvim | Fast Neovim http client written in Lua |
sidebar |
sidebar-nvim/sidebar.nvim | Generic and modular lua sidebar |
ufo |
kevinhwang91/nvim-ufo | Make folds look modern and keep a high performance |
Spec: rafi.plugins.extras.git.<name>
Name | Repository | Description |
---|---|---|
cmp-git |
petertriho/cmp-git | Git source for nvim-cmp |
fugitive |
tpope/vim-fugitive | Git client, including junegunn/gv.vim |
Spec: rafi.plugins.extras.lang.<name>
Name | Description |
---|---|
ansible |
imports lazyvim.plugins.extras.lang.ansible , add syntax and pearofducks/ansible-vim |
go |
imports lazyvim.plugins.extras.lang.go , add tools, patterns, etc. |
helm |
imports lazyvim.plugins.extras.lang.helm , add filetype patterns |
kubernetes |
imports lazyvim.plugins.extras.lang.yaml , add filetype patterns and ramilito/kubectl.nvim |
markdown |
imports lazyvim.plugins.extras.lang.markdown , disable headlines, add mzlogin/vim-markdown-toc |
python |
imports lazyvim.plugins.extras.lang.python , add syntax and filetype patterns |
tmux |
syntax, completion andersevenrud/cmp-tmux, keymaps christoomey/tmux-navigator |
Spec: rafi.plugins.extras.lsp.<name>
Key | Name | Description |
---|---|---|
gtd |
hrsh7th/nvim-gtd | LSP's go-to definition plugin |
lightbulb |
kosayoda/nvim-lightbulb | VSCode 💡 for neovim's built-in LSP |
yaml-companion |
yaml-companion.nvim | Get, set and autodetect YAML schemas in your buffers |
Spec: rafi.plugins.extras.org.<name>
Key | Name | Description |
---|---|---|
calendar |
itchyny/calendar.vim | Calendar application |
kiwi |
serenevoid/kiwi.nvim | Stripped down VimWiki |
telekasten |
renerocksai/telekasten.nvim | Manage text-based, markdown zettelkasten or wiki with telescope |
vimwiki |
vimwiki/vimwiki | Personal Wiki for Vim |
zk-nvim |
zk-org/zk-nvim | Extension for the zk plain text note-taking assistant |
Spec: rafi.plugins.extras.treesitter.<name>
Key | Name | Description |
---|---|---|
endwise |
RRethy/nvim-treesitter-endwise | Wisely add "end" in various filetypes |
treesj |
Wansmer/treesj | Splitting and joining blocks of code |
Spec: rafi.plugins.extras.ui.<name>
Key | Name | Description |
---|---|---|
alpha |
goolord/alpha-nvim | Fast and fully programmable greeter |
barbecue |
utilyre/barbecue.nvim | VS Code like winbar |
bookmarks |
tomasky/bookmarks.nvim | Bookmarks plugin with global file store |
bqf |
kevinhwang91/nvim-bqf | Better quickfix window |
ccc |
uga-rosa/ccc.nvim | Super powerful color picker/colorizer plugin |
cursorword |
itchyny/cursorword | Underlines word under cursor |
cybu |
ghillb/cybu.nvim | Cycle buffers with a customizable notification window |
deadcolumn |
Bekaboo/deadcolumn.nvim | Show colorcolumn dynamically |
goto-preview |
rmagatti/goto-preview | Preview definitions using floating windows |
headlines |
lukas-reineke/headlines.nvim | Adds horizontal highlights for headlines and code background. |
illuminate |
RRethy/vim-illuminate | Highlights other uses of the word under the cursor |
incline |
b0o/incline.nvim | Floating statuslines |
marks |
chentoast/marks.nvim | Interacting with and manipulating marks |
mini-clue |
echasnovski/mini.clue | Show next key clues |
mini-map |
echasnovski/mini.map | Window with buffer text overview, scrollbar and highlights |
symbols-outline |
simrat39/symbols-outline.nvim | Tree like view for symbols using LSP |
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.
These are only highlights:
lazyvim.plugins.extras.lang.json
lazyvim.plugins.extras.lang.markdown
lazyvim.plugins.extras.lang.terraform
lazyvim.plugins.extras.lang.typescript
- Spec:
lazyvim.plugins.extras.dap.<name>
- See lazyvim/plugins/extras/dap
- Spec:
lazyvim.plugins.extras.test.<name>
- See lazyvim/plugins/extras/test
Note that,
- Leader key set as Space
- Local-Leader key set as ; and used for navigation and search (Telescope 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 |
Key | Mode | Action |
---|---|---|
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 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 uh | Ⓝ | Toggle inlay-hints |
Space ui | Ⓝ | Show highlight groups for word |
Space ul | Ⓝ | Toggle line numbers |
Space uL | Ⓝ | Toggle relative line numbers |
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 scroll |
Space uT | Ⓝ | Toggle tree-sitter |
Space uw | Ⓝ | Toggle wrap |
Space uz | Ⓝ | Toggle distraction-free zen writing |
Space uZ | Ⓝ | Toggle window zoom |
Key | Mode | Action | Plugin or Mapping |
---|---|---|---|
j / k | Ⓝ Ⓥ | Cursor moves through display-lines | g j/k |
]i / [i | Ⓝ Ⓥ | Jump to scope edges | folke/snacks.nvim |
gh / gl | Ⓝ Ⓥ | Easier line-wise movement | g^ g$ |
zl / zh | Ⓝ | Scroll horizontally and vertically wider | z4 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 cursor | za |
Shift+Return | Ⓝ | Focus the current fold by closing all others | zMzv |
Ctrl+f | Ⓒ | Move cursor forwards in command | Right |
Ctrl+b | Ⓒ | Move cursor backwards in command | Left |
Ctrl+h | Ⓒ | Move cursor to the beginning in command | Home |
Ctrl+l | Ⓒ | Move cursor to the end in command | End |
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 |
Key | Mode | Action | Plugin or Mapping |
---|---|---|---|
Space+Space | Ⓝ Ⓥ | Toggle visual-line mode | V / Escape |
v / V | Ⓥ | Increment/shrink selection | nvim-treesitter |
vsp | Ⓝ | Select last paste | config/keymaps.lua |
sg | Ⓥ | Replace within selected area | config/keymaps.lua |
Ctrl+r | Ⓥ | Replace selection with step-by-step confirmation | config/keymaps.lua |
> / < | Ⓥ | Indent and re-select | config/keymaps.lua |
Tab / Shift+Tab | Ⓥ | Indent and re-select | config/keymaps.lua |
I / gI / A | Ⓥ | Force blockwise operation | config/keymaps.lua |
Key | Mode | Action | Plugin or Mapping |
---|---|---|---|
], or [, | Ⓝ | Next/previous parameter | akinsho/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 diagnostics | config/keymaps.lua |
]e or [e | Ⓝ | Next/previous error | config/keymaps.lua |
]w or [w | Ⓝ | Next/previous warning | config/keymaps.lua |
]b or [b | Ⓝ | Next/previous buffer | akinsho/bufferline.nvim |
]f or [f | Ⓝ | Next/previous function start | echasnovski/mini.ai |
]F or [F | Ⓝ | Next/previous function end | echasnovski/mini.ai |
]c or [c | Ⓝ | Next/previous class start | echasnovski/mini.ai |
]C or [C | Ⓝ | Next/previous class end | echasnovski/mini.ai |
]m or [m | Ⓝ | Next/previous method start | echasnovski/mini.ai |
]M or [M | Ⓝ | Next/previous method end | echasnovski/mini.ai |
]g or [g | Ⓝ | Next/previous Git hunk | lewis6991/gitsigns.nvim |
]i or [i | Ⓝ | Next/previous indent scope | echasnovski/mini.indentscope |
]t or [t | Ⓝ | Next/previous TODO | folke/todo-comments.nvim |
]z or [z | Ⓝ | Next/previous whitespace error | config/keymaps.lua |
Key | Mode | Action | Plugin or Mapping |
---|---|---|---|
Space+bd | Ⓝ | Delete buffer | folke/snacks.nvim |
Key | Mode | Action | Plugin or Mapping |
---|---|---|---|
p or P | Ⓥ | Paste without yank | :let @+=@0 |
Space+y | Ⓝ | Copy relative file-path to clipboard | config/keymaps.lua |
Space+Y | Ⓝ | Copy absolute file-path to clipboard | config/keymaps.lua |
Key | Mode | Action | Plugin or Mapping |
---|---|---|---|
Tab / Shift-Tab | Ⓘ Ⓢ | Navigate/open completion-menu | nvim-cmp |
Tab / Shift-Tab | Ⓘ Ⓢ | Navigate snippet placeholders | L3MON4D3/LuaSnip |
Ctrl+Space | Ⓘ | Open completion menu | nvim-cmp |
Enter | Ⓘ | Select completion item or expand snippet | nvim-cmp |
Shift+Enter | Ⓘ | Select and replace with completion item | nvim-cmp |
Ctrl+n/p | Ⓘ | Movement in completion pop-up | nvim-cmp |
Ctrl+f/b | Ⓘ | Scroll documentation | nvim-cmp |
Ctrl+d/u | Ⓘ | Scroll candidates | nvim-cmp |
Ctrl+e | Ⓘ | Abort selection and close pop-up | nvim-cmp |
Ctrl+l | Ⓘ | Expand snippet at cursor | L3MON4D3/LuaSnip |
Ctrl+c | Ⓘ | Close completion menu | nvim-cmp |
Key | Mode | Action | Plugin or Mapping |
---|---|---|---|
gr | Ⓝ | Go to references | plugins/lsp/keymaps.lua |
gR | Ⓝ | List references with Trouble | folke/trouble.nvim |
gd | Ⓝ | Go to definition | plugins/lsp/keymaps.lua |
gD | Ⓝ | Go to declaration | plugins/lsp/keymaps.lua |
gI | Ⓝ | Go to implementation | plugins/lsp/keymaps.lua |
gy | Ⓝ | Go to type definition | plugins/lsp/keymaps.lua |
K | Ⓝ | Show hover help or collapsed fold | plugins/lsp/keymaps.lua |
gK | Ⓝ | Show signature help | plugins/lsp/keymaps.lua |
Space cl | Ⓝ | Open LSP info window | plugins/lsp/keymaps.lua |
Space cr | Ⓝ | Rename | plugins/lsp/keymaps.lua |
Space ce | Ⓝ | Open diagnostics window | plugins/lsp/keymaps.lua |
Space co | Ⓝ | Formatter menu selection | plugins/lsp/keymaps.lua |
Space ca | Ⓝ Ⓥ | Code action | plugins/lsp/keymaps.lua |
Space cA | Ⓝ | Source action | plugins/lsp/keymaps.lua |
Space chi | Ⓝ | LSP incoming calls | plugins/lsp/keymaps.lua |
Space cho | Ⓝ | LSP outgoing calls | plugins/lsp/keymaps.lua |
Space fwa | Ⓝ | Add workspace folder | plugins/lsp/keymaps.lua |
Space fwr | Ⓝ | Remove workspace folder | plugins/lsp/keymaps.lua |
Space fwl | Ⓝ | List workspace folders | plugins/lsp/keymaps.lua |
gpd | Ⓝ | Glance definitions | dnlhc/glance.nvim |
gpr | Ⓝ | Glance references | dnlhc/glance.nvim |
gpy | Ⓝ | Glance type definitions | dnlhc/glance.nvim |
gpi | Ⓝ | Glance implementations | dnlhc/glance.nvim |
Key | Mode | Action | Plugin or Mapping |
---|---|---|---|
Space ud | Ⓝ | Toggle buffer diagnostics | plugins/lsp/keymaps.lua |
Space xt | Ⓝ | List TODO with Trouble | folke/todo-comments.nvim |
Space xT | Ⓝ | List TODO/FIXME with Trouble | folke/todo-comments.nvim |
Space st | Ⓝ | Select TODO with Telescope | folke/todo-comments.nvim |
Space sT | Ⓝ | Select TODO/FIXME with Telescope | folke/todo-comments.nvim |
Space xx | Ⓝ | Toggle Trouble | folke/trouble.nvim |
Space xd | Ⓝ | Toggle Trouble document | folke/trouble.nvim |
Space xw | Ⓝ | Toggle Trouble workspace | folke/trouble.nvim |
Space xq | Ⓝ | Toggle Quickfix via Trouble | folke/trouble.nvim |
Space xl | Ⓝ | Toggle Locationlist via Trouble | folke/trouble.nvim |
Key | Mode | Action | Plugin or Mapping |
---|---|---|---|
Ctrl+q | Ⓝ | Start recording macro | q |
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 below | o<Esc> |
[ Space | Ⓝ | Add new line above | O<Esc> |
gc | Ⓝ Ⓥ | Comment prefix | numToStr/Comment.nvim |
gcc | Ⓝ Ⓥ | Toggle comments | numToStr/Comment.nvim |
Space+j or k | Ⓝ Ⓥ | Move lines down/up | :m … |
Space+v | Ⓝ Ⓥ | Toggle line-wise comments | numToStr/Comment.nvim |
Space+V | Ⓝ Ⓥ | Toggle block-wise comments | numToStr/Comment.nvim |
Space+dd | Ⓝ Ⓥ | Duplicate line or selection | config/keymaps.lua |
Space+cw | Ⓝ | Remove all spaces at EOL | echasnovski/mini.trailspace |
Space+cid | Ⓝ | LazyDev | folke/lazydev.nvim |
Space+cif | Ⓝ | LazyFormatterInfo | [LazyVim/LazyVim] |
Space+cir | Ⓝ | LazyRoot | [LazyVim/LazyVim] |
sj / sk | Ⓝ | Join/split arguments | echasnovski/mini.splitjoin |
Key | Mode | Action | Plugin or Mapping |
---|---|---|---|
* / # | Ⓝ Ⓥ | Search partial words | g* / g# |
g* / g# | Ⓝ Ⓥ | Search whole-word forward/backward | * / # |
Ctrl+c | Ⓝ | Change inner word | ciw |
Escape | Ⓝ | Clear search highlight | :nohlsearch |
Backspace | Ⓝ | Match bracket | % |
Space+bf | Ⓝ | Diff current windows in tab | windo diffthis |
Space+bF | Ⓝ | External diff | !vim.g.diffprg % # |
ss | Ⓝ Ⓥ Ⓞ | Flash jump | folke/flash.nvim |
S | Ⓝ Ⓥ Ⓞ | Flash treesitter | folke/flash.nvim |
r | Ⓞ | Flash remote | folke/flash.nvim |
R | Ⓥ Ⓞ | Flash treesitter search | folke/flash.nvim |
Ctrl+s | Ⓒ | Toggle flash in search input | folke/flash.nvim |
Key | Mode | Action | Plugin or Mapping |
---|---|---|---|
g! | Ⓝ | Read vim command into buffer | :put=execute('⌴') |
Ctrl+n / p | Ⓒ | Switch history search pairs | ↓ / ↑ |
↓ / ↑ | Ⓒ | Switch history search pairs | Ctrl n /p |
Key | Mode | Action | Plugin 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 |
Key | Mode | Action | Plugin or Mapping |
---|---|---|---|
q | Ⓝ | Quit window (if last window, quit nvim) | :quit |
Ctrl+x | Ⓝ | Rotate window placement | C-w x |
Space qq | Ⓝ | Quit all and exit | :quitall |
sp | Ⓝ | Choose a window to edit | s1n7ax/nvim-window-picker |
sw | Ⓝ | Switch editing window with selected | s1n7ax/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 | :quit |
sx | Ⓝ | Delete buffer, leave blank window | :enew │ bdelete |
sz | Ⓝ | Toggle window zoom | :vertical resize │ resize |
sh | Ⓝ | Toggle colorscheme background=dark/light | :set background … |
Key | Mode | Action | Plugin or Mapping |
---|---|---|---|
;+c | Ⓝ | Open context-menu | lua/rafi/util/contextmenu.lua |
gCtrl+o | Ⓝ | Navigate to previous file on jumplist | util/edit.lua |
gCtrl+i | Ⓝ | Navigate to next file on jumplist | util/edit.lua |
Ctrl+/ | Ⓝ | Toggle terminal | folke/snacks.nvim |
Space l | Ⓝ | Open Lazy | folke/lazy.nvim |
Space o | Ⓝ | Open Outline side | [hedyhli/outline.nvim] |
Space ? | Ⓝ | Open the macOS dictionary on current word | :!open dict:// |
Space cp | Ⓝ | Toggle Markdown preview | iamcco/markdown-preview.nvim |
Space mc | Ⓝ | Open color-picker | uga-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 history | config/keymaps.lua |
Space gl | Ⓝ | Open Lazygit log | config/keymaps.lua |
Space gL | Ⓝ | Open Lazygit log (cwd) | config/keymaps.lua |
Space gb | Ⓝ | Git blame | FabijanZulj/blame.nvim |
Space gB | Ⓝ | Git blame in window | FabijanZulj/blame.nvim |
Space gm | Ⓝ | Reveal commit under cursor | config/keymaps.lua |
Space go | Ⓝ Ⓥ | Open source-code URL in browser | config/keymaps.lua |
Space gY | Ⓝ Ⓥ | Copy source-code URL | config/keymaps.lua |
Space gu | Ⓝ | Open undo-tree | mbbill/undotree |
Space mg | Ⓝ | Open Neogit | NeogitOrg/neogit |
Space ml | Ⓝ | Append modeline to end of buffer | config/keymaps.lua |
Space mda | Ⓥ | Sequentially mark region for diff | AndrewRadev/linediff.vim |
Space mdf | Ⓥ | Mark region for diff and compare if more than one | AndrewRadev/linediff.vim |
Space mds | Ⓝ | Shows the comparison for all marked regions | AndrewRadev/linediff.vim |
Space mdr | Ⓝ | Removes the signs denoting the diff regions | AndrewRadev/linediff.vim |
Space mh | Ⓝ | Open HTTP Rest UI | rest-nvim/rest.nvim |
Space mt | Ⓝ Ⓥ | Toggle highlighted word | t9md/vim-quickhl |
Space mo | Ⓝ | Update Markdown TOC | mzlogin/vim-markdown-toc |
See echasnovski/mini.surround for more mappings and usage information.
Key | Mode | Action |
---|---|---|
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 |
See lewis6991/gitsigns.nvim for more mappings and usage information.
Key | Mode | Action |
---|---|---|
]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 |
See sindrets/diffview.nvim for more mappings and usage information.
Key | Mode | Action |
---|---|---|
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 |
See telescope.nvim for more mappings and usage information.
Key | Mode | Action |
---|---|---|
;r | Ⓝ | Results of the previous picker |
;p | Ⓝ | List of the previous pickers |
;f | Ⓝ | File search |
;g | Ⓝ | Grep search |
;b | Ⓝ | Buffers |
;h | Ⓝ | Highlights |
;j | Ⓝ | Jump points |
;m | Ⓝ | Marks |
;o | Ⓝ | Vim options |
;t | Ⓝ | LSP workspace symbols |
;v | Ⓝ Ⓥ | Yank history |
;n | Ⓝ | Plugins |
;k | Ⓝ | Thesaurus |
;u | Ⓝ | Spelling suggestions |
;s | Ⓝ | Sessions |
;x | Ⓝ | Old files |
;w | Ⓝ | Zk notes |
;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 under cursor |
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 |
Within Telescope 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 Telescope |
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 |
See nvim-neo-tree/neo-tree.nvim for more mappings and usage information.
Key | Mode | Action |
---|---|---|
fe / Spacee | Ⓝ | Toggle file explorer (root) |
fE / SpaceE | Ⓝ | Toggle file explorer (cwd) |
ge | Ⓝ | Open Git explorer |
be | Ⓝ | Open Buffer explorer |
xe | Ⓝ | Open Document explorer |
;a | Ⓝ | Focus current file in file-explorer |
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 |
See chentau/marks.nvim for more mappings and usage information.
Key | Mode | Action |
---|---|---|
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 |
See zk-org/zk-nvim and zk for more mappings and usage information.
Key | Mode | Action |
---|---|---|
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 |