diff --git a/nvim/lua/settings/lazy/plugins/barbar.lua b/nvim/lua/settings/lazy/plugins/barbar.lua index 829aba5..f319391 100644 --- a/nvim/lua/settings/lazy/plugins/barbar.lua +++ b/nvim/lua/settings/lazy/plugins/barbar.lua @@ -10,6 +10,40 @@ return { local map = vim.api.nvim_set_keymap local opts = { noremap = true, silent = true } + local whichKey = require("which-key") + + whichKey.register({ + ["b"] = { + name = "Barbar", + d = { + "BarbarDisable", + "Disable Barbar" + }, + e = { + "BarbarEnable", + "Enable Barbar" + }, + c = { + name = "Close", + c = { + "BufferCloseAllButCurrent", + "Close all buffers but the current one" + }, + p = { + "BufferCloseAllButPinned", + "Close all buffers but the pinned ones" + }, + l = { + "BufferCloseBuffersLeft", + "Close all buffers to the left" + }, + r = { + "BufferCloseBuffersRight", + "Close all buffers to the right" + } + } + } + }) map("n", "", "BufferPrevious", opts) map("n", "", "BufferNext", opts)