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, 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', '', 'BufferCloseAllButCurrent', opts) -- :BufferCloseAllButPinned -- :BufferCloseAllButCurrentOrPinned -- :BufferCloseBuffersLeft -- :BufferCloseBuffersRight -- Magic buffer-picking mode map('n', '', 'BufferPick', opts) -- Close windows map('n', '', ':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 -- Custom Highlighting Code -- Wrapped in an autocmd to make sure it executes after the current colorscheme vim.api.nvim_create_autocmd("VimEnter", { callback = function() vim.cmd [[ " Darcula theme base colors " Current Buffer hi BufferCurrent guifg='#A9B7C6' guibg='#000000' gui=NONE hi BufferCurrentMod guifg='#CF748E' guibg='#550000' gui=NONE hi BufferCurrentSign guifg='#A9B7C6' guibg='#000000' gui=NONE hi BufferCurrentNumber guifg='#FFFF00' guibg='#000000' gui=bold hi BufferCurrentIcon guifg='#000000' guibg='#000000' gui=NONE hi BufferCurrentIndex guifg='#FFFF00' guibg='#000000' gui=NONE hi BufferCurrentTarget guifg='#9876AA' guibg='#000000' gui=NONE " Visible Buffer hi BufferVisible guifg='#6A8759' guibg='#000000' gui=NONE hi BufferVisibleMod guifg='#C97F69' guibg='#550000' gui=NONE hi BufferVisibleSign guifg='#6A8759' guibg='#000000' gui=NONE hi BufferVisibleNumber guifg='#FF00FF' guibg='#000000' gui=bold hi BufferVisibleIcon guifg='#6897BB' guibg='#000000' gui=NONE hi BufferVisibleIndex guifg='#FF00FF' guibg='#000000' gui=NONE hi BufferVisibleTarget guifg='#9876AA' guibg='#000000' gui=NONE " Inactive Buffer hi BufferInactive guifg='#808080' guibg='#000000' gui=NONE hi BufferInactiveMod guifg='#BF6477' guibg='#330000' gui=NONE hi BufferInactiveSign guifg='#808080' guibg='#000000' gui=NONE hi BufferInactiveNumber guifg='#FFFFFF' guibg='#000000' gui=bold hi BufferInactiveIcon guifg='#6897BB' guibg='#000000' gui=NONE hi BufferInactiveIndex guifg='#FFFFFF' guibg='#000000' gui=NONE hi BufferInactiveTarget guifg='#9876AA' guibg='#000000' gui=NONE ]] end }) end }