---@type LazySpec return { { 'akinsho/bufferline.nvim', -- shows the opened buffers event = 'VeryLazy', dependencies = { 'nvim-tree/nvim-web-devicons', }, ---@type bufferline.UserConfig opts = { options = { mode = 'buffers', separator_style = '', sort_by = 'directory', diagnostics = 'nvim_lsp', diagnostics_indicator = function(c, _, _, _) return '(' .. c .. ')' end, }, }, config = function(_, opts) require('bufferline').setup(opts) Map('n', '', 'BufferLineCycleNext', { desc = 'switch to the next tab' }) Map('n', '', 'BufferLineCyclePrev', { desc = 'switch to the previous tab' }) Map('n', 'wch', 'BufferLineCloseLeft', { desc = 'close the tabs on the left' }) Map('n', 'wcl', 'BufferLineCloseRight', { desc = 'close the tabs on the right' }) Map('n', 'wcw', 'BufferLineCloseOthers', { desc = 'close all tabs except the current one' }) end, } }