A small command palette for Neovim built on snacks.nvim.
It makes Ex commands easier to discover by showing human-readable descriptions next to them.
:ascii print ascii value of character under the cursor
:bdelete remove a buffer from the buffer list
:checkhealth run healthchecks
:colorscheme load a specific color scheme
:messages view previously displayed messages
:registers display the contents of registers
:set show or set options
:undolist list leaves of the undo tree
For built-in Ex commands, descriptions are read from Neovim's own:
$VIMRUNTIME/doc/index.txt
For plugin/user commands, the plugin uses nvim_get_commands() and buffer-local nvim_buf_get_commands() metadata.
If a user command has no desc, the plugin tries to derive a useful one-line description from its definition. As a final fallback it shows a shortened version of the command definition instead of a generic User command label.
When you select a command:
- commands with
nargs = 0execute immediately; - commands accepting arguments prefill the command line, e.g.
:colorscheme, leaving you to type only the argument; - interactive built-ins such as
:append,:change, and:insertare prefixed instead of executed immediately.
- Neovim 0.10+
- folke/snacks.nvim with the picker enabled
{
"warpspin/ex-command-palette.nvim",
dependencies = {
"folke/snacks.nvim",
},
opts = {},
keys = {
{
"<leader>g:",
function()
require("ex-command-palette").open()
end,
desc = "Go to Command",
},
},
}The plugin also registers:
:ExCommandPaletteNo keymap is installed automatically.
require("ex-command-palette").setup({
title = "Commands",
-- Override whether specific zero-argument commands execute immediately.
-- false means: put the command onto the ':' command line instead.
direct = {
append = false,
change = false,
insert = false,
},
})You can add your own exceptions:
opts = {
direct = {
qall = false,
restart = false,
},
}The plugin deliberately does not maintain its own database of Ex commands. Built-in descriptions come from the Neovim version you are actually running, so the palette follows your installed runtime documentation.
Likewise, user/plugin commands are inspected at picker-open time so commands loaded lazily by plugins appear automatically.
0BSD