A vertical, floating plugin bar pinned to the top-right of your Neovim window. Each installed plugin shows as an icon; click one (mouse or keyboard) to pop open a menu of that plugin's commands.
Plugins expose their commands through a tiny, optional API — no hard dependency on pluginbar.
- Neovim ≥ 0.11
- lazy.nvim (used to auto-list installed plugins; optional)
mouseenabled for click support (default in Neovim)
{
"samuelnihoul/pluginbar.nvim",
cmd = "PluginBar",
keys = { { "<leader>pb", desc = "Toggle plugin bar" } },
config = function()
local bar = require("pluginbar")
bar.setup({ keymap = "<leader>pb" })
-- Register plugins that expose a command API. `commands` is wrapped in a
-- function so the plugin is only required when its icon is clicked.
bar.register({
name = "Flashcards",
icon = "📇",
match = "flashcards.nvim",
commands = function() return require("flashcards").commands() end,
})
bar.register({
name = "Immersion",
icon = "🌐",
match = "immersion.nvim",
commands = function() return require("immersion").commands() end,
})
end,
}:PluginBar(or<leader>pb) toggles the bar.- In the bar: click an icon, or move with
j/kand press<CR>. - In the command menu: click a command, or
<CR>to run it;q/<Esc>to go back.
Any plugin can participate by exposing two things on its main module:
-- Icon shown in the bar (optional; falls back to the first letter).
M.bar_icon = "📇"
-- Returns a list of user-facing actions.
function M.commands()
return {
{ name = "Review", desc = "Review due cards", run = function() vim.cmd("FlashReview") end },
{ name = "Add card", desc = "Add a flashcard", run = function() vim.cmd("FlashAdd") end },
}
endEach command is { name = string, desc = string?, run = function }. The bar
calls run (scheduled, after closing itself) when the command is selected.
You then register the plugin with the bar (see installation), or call
require("pluginbar").register({ name = ..., commands = ... }) from anywhere.
require("pluginbar").setup({
width = 5, -- bar width in columns
max_height = 0.9, -- max bar height as a fraction of editor height
border = "rounded",
show_installed = true, -- also list installed plugins that didn't register
menu_width = 34, -- command-menu width
keymap = "<leader>pb", -- toggle keymap (false to disable)
})MIT