2022-02-28 03:11:17 +00:00
|
|
|
local M = {}
|
2022-05-01 17:43:11 +00:00
|
|
|
|
2022-02-28 03:11:17 +00:00
|
|
|
function M.config()
|
2023-01-10 18:21:09 +00:00
|
|
|
local status_ok, bufferline = pcall(require, 'bufferline')
|
|
|
|
if not status_ok then
|
2022-02-28 03:11:17 +00:00
|
|
|
return
|
|
|
|
end
|
|
|
|
|
2023-01-10 18:21:09 +00:00
|
|
|
bufferline.setup({
|
2022-02-28 03:11:17 +00:00
|
|
|
options = {
|
2023-01-10 18:21:09 +00:00
|
|
|
close_command = 'Bdelete! %d', -- use vim-bbye
|
|
|
|
right_mouse_command = 'Bdelete! %d', -- use vim-bbye
|
2022-09-19 20:04:23 +00:00
|
|
|
offsets = {
|
2022-09-30 17:30:39 +00:00
|
|
|
{
|
2023-01-10 18:21:09 +00:00
|
|
|
filetype = 'NvimTree',
|
|
|
|
text = '',
|
|
|
|
padding = 1,
|
|
|
|
},
|
2022-09-30 17:30:39 +00:00
|
|
|
},
|
2022-02-28 03:11:17 +00:00
|
|
|
show_buffer_close_icons = false,
|
|
|
|
show_close_icon = false,
|
2022-09-20 00:02:20 +00:00
|
|
|
tab_size = 12, -- minimum size
|
2022-09-19 20:04:23 +00:00
|
|
|
max_name_length = 40,
|
2022-02-28 03:11:17 +00:00
|
|
|
max_prefix_length = 13,
|
|
|
|
show_tab_indicators = true,
|
|
|
|
enforce_regular_tabs = false,
|
2023-01-10 18:21:09 +00:00
|
|
|
view = 'multiwindow',
|
|
|
|
separator_style = 'thick',
|
2022-02-28 03:11:17 +00:00
|
|
|
always_show_bufferline = true,
|
|
|
|
diagnostics = false,
|
|
|
|
},
|
2023-01-10 18:21:09 +00:00
|
|
|
})
|
2022-02-28 03:11:17 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
return M
|