151 lines
2.9 KiB
Lua
151 lines
2.9 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 = '▎',
|
|
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 = {
|
|
background = {
|
|
fg = scolors.tab_fg,
|
|
bg = scolors.tab_bg,
|
|
},
|
|
|
|
-- Buffers
|
|
buffer_selected = {
|
|
fg = scolors.selected_fg,
|
|
bg = scolors.selected_bg,
|
|
--gui = colors.none,
|
|
},
|
|
buffer_visible = {
|
|
fg = scolors.selected_fg,
|
|
bg = scolors.selected_bg,
|
|
},
|
|
|
|
-- Diagnostics
|
|
error = {
|
|
fg = scolors.red,
|
|
bg = scolors.red,
|
|
},
|
|
error_diagnostic = {
|
|
fg = scolors.red,
|
|
bg = scolors.red,
|
|
},
|
|
|
|
-- Close buttons
|
|
close_button = {
|
|
fg = scolors.tab_fg,
|
|
bg = scolors.tab_bg,
|
|
},
|
|
close_button_visible = {
|
|
fg = scolors.selected_fg,
|
|
bg = scolors.selected_bg,
|
|
},
|
|
close_button_selected = {
|
|
fg = scolors.red,
|
|
bg = scolors.selected_bg,
|
|
},
|
|
fill = {
|
|
fg = scolors.empty_fg,
|
|
bg = scolors.empty_bg,
|
|
},
|
|
indicator_selected = {
|
|
fg = scolors.green,
|
|
bg = scolors.selected_bg,
|
|
},
|
|
|
|
-- Modified
|
|
modified = {
|
|
fg = scolors.red,
|
|
bg = scolors.tab_bg,
|
|
},
|
|
modified_visible = {
|
|
fg = scolors.tab_fg,
|
|
bg = scolors.tab_bg,
|
|
},
|
|
modified_selected = {
|
|
fg = scolors.green,
|
|
bg = scolors.selected_bg,
|
|
},
|
|
|
|
-- Separators
|
|
separator = {
|
|
fg = scolors.empty_bg,
|
|
bg = scolors.tab_bg,
|
|
},
|
|
separator_visible = {
|
|
fg = scolors.empty_bg,
|
|
bg = scolors.selected_bg,
|
|
},
|
|
separator_selected = {
|
|
fg = scolors.empty_bg,
|
|
bg = scolors.selected_bg,
|
|
},
|
|
|
|
-- Tabs
|
|
tab = {
|
|
fg = scolors.tab_fg,
|
|
bg = scolors.tab_bg,
|
|
},
|
|
tab_selected = {
|
|
fg = scolors.selected_fg,
|
|
bg = scolors.selected_bg,
|
|
},
|
|
tab_close = {
|
|
fg = scolors.selected_fg,
|
|
bg = scolors.selected_bg,
|
|
},
|
|
}
|
|
}
|
|
end
|
|
|
|
return M
|
|
|