return { "romgrk/barbar.nvim", version = "^1.0.0", -- optional: only update when a new 1.x version is released dependencies = { "lewis6991/gitsigns.nvim", "nvim-tree/nvim-web-devicons" }, event = { "BufReadPre", "BufNewFile" }, init = function() vim.g.barbar_auto_setup = false vim.keymap.set("n", "<A-,>", "<Cmd>BufferPrevious<CR>", { noremap = true, silent = true }) vim.keymap.set("n", "<A-.>", "<Cmd>BufferNext<CR>", { noremap = true, silent = true }) vim.keymap.set("n", "<A-<>", "<Cmd>BufferMovePrevious<CR>", { noremap = true, silent = true }) vim.keymap.set("n", "<A->>", "<Cmd>BufferMoveNext<CR>", { noremap = true, silent = true }) vim.keymap.set("n", "<A-p>", "<Cmd>BufferPin<CR>", { noremap = true, silent = true }) vim.keymap.set("n", "<A-c>", "<Cmd>BufferClose<CR>", { noremap = true, silent = true }) vim.keymap.set("n", "<A-C>", "<Cmd>BufferCloseAllButCurrentOrPinned<CR>", { noremap = true, silent = true }) vim.keymap.set("n", "<C-p>", "<Cmd>BufferPick<CR>", { noremap = true, silent = true }) vim.keymap.set("n", "<Space>bb", "<Cmd>BufferOrderByBufferNumber<CR>", { noremap = true, silent = true }) vim.keymap.set("n", "<Space>bd", "<Cmd>BufferOrderByDirectory<CR>", { noremap = true, silent = true }) vim.keymap.set("n", "<Space>bl", "<Cmd>BufferOrderByLanguage<CR>", { noremap = true, silent = true }) vim.keymap.set("n", "<Space>bw", "<Cmd>BufferOrderByWindowNumber<CR>", { noremap = true, silent = true }) end, config = true, opts = { animation = true, auto_hide = false, tabpages = true, hide = { extensions = true }, modified = { button = "●" }, pinned = { button = "車", filename = true, separator = { right = "" } }, icons = { separator = { left = "", right = "|" }, button = "", diagnostics = { [vim.diagnostic.severity.ERROR] = { enabled = true, icon = require("ui.lsp_icons").Error }, [vim.diagnostic.severity.WARN] = { enabled = true, icon = require("ui.lsp_icons").Warn }, [vim.diagnostic.severity.INFO] = { enabled = true, icon = require("ui.lsp_icons").Hint }, [vim.diagnostic.severity.HINT] = { enabled = true, icon = require("ui.lsp_icons").Info }, }, filetype = { custom_colors = false, enabled = true, }, }, }, }