return { 'romgrk/barbar.nvim', -- Tabs for Buffers and easy buffer use config = function() vim.g.barbar_auto_setup = false require('barbar').setup({ animation = true, clickable = true, insert_at_end = true, highlight_visible = true, icons = { buffer_index = true, buffer_number = false, button = 'x', -- Enables / disables diagnostic symbols diagnostics = { [vim.diagnostic.severity.ERROR] = {enabled = true, icon = '🆘'}, [vim.diagnostic.severity.WARN] = {enabled = true, icon = 'âš ī¸'}, [vim.diagnostic.severity.INFO] = {enabled = true, icon = 'â„šī¸'}, [vim.diagnostic.severity.HINT] = {enabled = true}, }, gitsigns = { added = {enabled = false, icon = '+'}, changed = {enabled = false, icon = '~'}, deleted = {enabled = false, icon = '-'}, }, filetype = { -- Sets the icon's highlight group. -- If false, will use nvim-web-devicons colors custom_colors = false, -- Requires `nvim-web-devicons` if `true` enabled = true, }, }, sidebar_filetypes = { NvimTree = true } }) local map = vim.api.nvim_set_keymap local opts = { noremap = true, silent = true } -- Move to previous/next -- map('n', '', 'BufferPrevious', opts) -- map('n', '', 'BufferNext', opts) -- -- Re-order to previous/next -- map('n', '', 'BufferMovePrevious', opts) -- map('n', '>', 'BufferMoveNext', opts) -- Goto buffer in position... map('n', '1', 'BufferGoto 1', opts) map('n', '2', 'BufferGoto 2', opts) map('n', '3', 'BufferGoto 3', opts) map('n', '4', 'BufferGoto 4', opts) map('n', '5', 'BufferGoto 5', opts) map('n', '6', 'BufferGoto 6', opts) map('n', '7', 'BufferGoto 7', opts) map('n', '8', 'BufferGoto 8', opts) map('n', '9', 'BufferGoto 9', opts) map('n', '0', 'BufferLast', opts) -- Pin/unpin buffer -- map('n', '', 'BufferPin', opts) -- Wipeout buffer -- :BufferWipeout -- Close commands map('n', 'bf', 'BufferCloseAllButCurrent', opts) -- :BufferCloseAllButPinned -- :BufferCloseAllButCurrentOrPinned -- :BufferCloseBuffersLeft -- :BufferCloseBuffersRight -- Magic buffer-picking mode map('n', 'bs', 'BufferPick', opts) -- Close windows map('n', 'bc', ':confirm BufferClose', {silent = true}) -- Sort automatically by... -- map('n', 'bb', 'BufferOrderByBufferNumber', opts) -- map('n', 'bd', 'BufferOrderByDirectory', opts) -- map('n', 'bl', 'BufferOrderByLanguage', opts) -- map('n', 'bw', 'BufferOrderByWindowNumber', opts) -- Other: -- :BarbarEnable - enables barbar (enabled by default) -- :BarbarDisable - very bad command, should never be used end }