142 lines
2.8 KiB
Lua
142 lines
2.8 KiB
Lua
local M = {}
|
|
|
|
function M.config()
|
|
local status_ok, bufferline = pcall(require, "bufferline")
|
|
if not status_ok then
|
|
return
|
|
end
|
|
|
|
-- Semantic Colors
|
|
local scolors = {
|
|
empty_fg = '#ced2dc',
|
|
empty_bg = '#252526',
|
|
tab_fg = '#ced2dc',
|
|
tab_bg = '#303030',
|
|
selected_fg = '#ced2dc',
|
|
selected_bg = '#404040',
|
|
green = '#6a9955',
|
|
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 = '▎',
|
|
modified_icon = "",
|
|
--buffer_close_icon = "",
|
|
show_buffer_close_icons = false,
|
|
--close_icon = "",
|
|
show_close_icon = false,
|
|
left_trunc_marker = "",
|
|
right_trunc_marker = "",
|
|
max_name_length = 14,
|
|
max_prefix_length = 13,
|
|
tab_size = 20,
|
|
show_tab_indicators = true,
|
|
enforce_regular_tabs = false,
|
|
view = "multiwindow",
|
|
separator_style = "thick",
|
|
always_show_bufferline = true,
|
|
diagnostics = false,
|
|
},
|
|
|
|
highlights = {
|
|
background = {
|
|
guifg = scolors.tab_fg,
|
|
guibg = scolors.tab_bg,
|
|
},
|
|
|
|
-- Buffers
|
|
buffer_selected = {
|
|
guifg = scolors.selected_fg,
|
|
guibg = scolors.selected_bg,
|
|
--gui = colors.none,
|
|
},
|
|
buffer_visible = {
|
|
guifg = scolors.selected_fg,
|
|
guibg = scolors.selected_bg,
|
|
},
|
|
|
|
-- Diagnostics
|
|
error = {
|
|
guifg = scolors.red,
|
|
guibg = scolors.red,
|
|
},
|
|
error_diagnostic = {
|
|
guifg = scolors.red,
|
|
guibg = scolors.red,
|
|
},
|
|
|
|
-- Close buttons
|
|
close_button = {
|
|
guifg = scolors.tab_fg,
|
|
guibg = scolors.tab_bg,
|
|
},
|
|
close_button_visible = {
|
|
guifg = scolors.selected_fg,
|
|
guibg = scolors.selected_bg,
|
|
},
|
|
close_button_selected = {
|
|
guifg = scolors.red,
|
|
guibg = scolors.selected_bg,
|
|
},
|
|
fill = {
|
|
guifg = scolors.empty_fg,
|
|
guibg = scolors.empty_bg,
|
|
},
|
|
indicator_selected = {
|
|
guifg = scolors.green,
|
|
guibg = scolors.selected_bg,
|
|
},
|
|
|
|
-- Modified
|
|
modified = {
|
|
guifg = scolors.red,
|
|
guibg = scolors.tab_bg,
|
|
},
|
|
modified_visible = {
|
|
guifg = scolors.tab_fg,
|
|
guibg = scolors.tab_bg,
|
|
},
|
|
modified_selected = {
|
|
guifg = scolors.green,
|
|
guibg = scolors.selected_bg,
|
|
},
|
|
|
|
-- Separators
|
|
separator = {
|
|
guifg = scolors.empty_bg,
|
|
guibg = scolors.tab_bg,
|
|
},
|
|
separator_visible = {
|
|
guifg = scolors.empty_bg,
|
|
guibg = scolors.selected_bg,
|
|
},
|
|
separator_selected = {
|
|
guifg = scolors.empty_bg,
|
|
guibg = scolors.selected_bg,
|
|
},
|
|
|
|
-- Tabs
|
|
tab = {
|
|
guifg = scolors.tab_fg,
|
|
guibg = scolors.tab_bg,
|
|
},
|
|
tab_selected = {
|
|
guifg = scolors.selected_fg,
|
|
guibg = scolors.selected_bg,
|
|
},
|
|
tab_close = {
|
|
guifg = scolors.selected_fg,
|
|
guibg = scolors.selected_bg,
|
|
},
|
|
}
|
|
}
|
|
end
|
|
|
|
return M
|
|
|