return { "romgrk/barbar.nvim", event = "BufNew", dependencies = { "lewis6991/gitsigns.nvim", "nvim-tree/nvim-web-devicons", }, init = function() vim.g.barbar_auto_setup = false 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) map("n", "", "BufferMovePrevious", opts) map("n", ">", "BufferMoveNext", opts) map("n", "", "BufferGoto 1", opts) map("n", "", "BufferGoto 2", opts) map("n", "", "BufferGoto 3", opts) map("n", "", "BufferGoto 4", opts) map("n", "", "BufferGoto 5", opts) map("n", "", "BufferGoto 6", opts) map("n", "", "BufferGoto 7", opts) map("n", "", "BufferGoto 8", opts) map("n", "", "BufferGoto 9", opts) map("n", "", "BufferLast", opts) map("n", "", "BufferPin", opts) map("n", "", "BufferClose", opts) map("n", "", "BufferPick", opts) end, opts = {}, }