local M = {} function M.config() local status_ok, bufferline = pcall(require, "bufferline") if not status_ok then return end -- Semantic Colors local scolors = { white_fg = '#ced2dc', gray_fg = '#a6abb2', tab_visible_bg = '#404040', tab_bg = '#353535', empty_bg = '#252526', green = '#6a9955', yellow = '#d8b92d', red = '#d16969', none = 'NONE', } bufferline.setup { options = { close_command = "Bdelete! %d", -- use vim-bbye right_mouse_command = "Bdelete! %d", -- use vim-bbye offsets = { { filetype = "NvimTree", text = "", padding = 1 } }, indicator = { icon = '▎', style = 'icon' }, modified_icon = "", --buffer_close_icon = "", show_buffer_close_icons = false, --close_icon = "", show_close_icon = false, left_trunc_marker = "", right_trunc_marker = "", tab_size = 12, -- minimum size max_name_length = 40, max_prefix_length = 13, show_tab_indicators = true, enforce_regular_tabs = false, view = "multiwindow", separator_style = "thick", always_show_bufferline = true, diagnostics = false, }, highlights = { fill = { fg = scolors.white_fg, bg = scolors.empty_bg, }, background = { fg = scolors.white_fg, bg = scolors.tab_bg, }, -- Buffers buffer_selected = { fg = scolors.white_fg, bg = scolors.tab_visible_bg, --gui = colors.none, }, buffer_visible = { fg = scolors.white_fg, bg = scolors.tab_visible_bg, }, -- de-duplicate text duplicate = { fg = scolors.gray_fg, bg = scolors.tab_bg, --gui = colors.none, }, duplicate_visible = { fg = scolors.gray_fg, bg = scolors.tab_visible_bg, }, duplicate_selected = { fg = scolors.gray_fg, bg = scolors.tab_visible_bg, }, -- Diagnostics error = { fg = scolors.red, bg = scolors.red, }, error_diagnostic = { fg = scolors.red, bg = scolors.red, }, -- Close buttons close_button = { fg = scolors.white_fg, bg = scolors.tab_bg, }, close_button_visible = { fg = scolors.white_fg, bg = scolors.tab_visible_bg, }, close_button_selected = { fg = scolors.red, bg = scolors.tab_visible_bg, }, -- Open buffer indicator indicator_selected = { fg = scolors.green, bg = scolors.tab_visible_bg, }, indicator_visible = { bg = scolors.tab_visible_bg, }, -- Modified modified = { fg = scolors.yellow, bg = scolors.tab_bg, }, modified_visible = { fg = scolors.yellow, bg = scolors.tab_visible_bg, }, modified_selected = { fg = scolors.yellow, bg = scolors.tab_visible_bg, }, -- Separators separator = { fg = scolors.empty_bg, bg = scolors.tab_bg, }, separator_visible = { fg = scolors.empty_bg, bg = scolors.tab_visible_bg, }, separator_selected = { fg = scolors.empty_bg, bg = scolors.tab_visible_bg, }, -- Tabs tab = { fg = scolors.white_fg, bg = scolors.tab_bg, }, tab_selected = { fg = scolors.white_fg, bg = scolors.tab_visible_bg, }, tab_close = { fg = scolors.white_fg, bg = scolors.tab_visible_bg, }, } } end return M