nvim/lua/plugins/bufferline.lua

57 lines
2.7 KiB
Lua
Raw Normal View History

2023-02-12 17:26:24 +00:00
return {
config = {
options = {
mode = "buffers", -- set to "tabs" to only show tabpages instead
2024-04-10 16:09:58 +00:00
themable = true, -- allows highlight groups to be overriden i.e. sets highlights as default
numbers = "buffer_id",
close_command = "bdelete! %d", -- can be a string | function, | false see "Mouse actions"
right_mouse_command = "bdelete! %d", -- can be a string | function | false, see "Mouse actions"
left_mouse_command = "buffer %d", -- can be a string | function, | false see "Mouse actions"
middle_mouse_command = nil, -- can be a string | function, | false see "Mouse actions"
2023-02-12 17:26:24 +00:00
indicator = {
2024-04-10 16:09:58 +00:00
icon = '', -- this should be omitted if indicator style is not 'icon'
2023-02-12 17:26:24 +00:00
style = 'icon',
},
2024-04-10 16:09:58 +00:00
buffer_close_icon = '󰅖',
2023-02-12 17:26:24 +00:00
modified_icon = '',
close_icon = '',
left_trunc_marker = '',
right_trunc_marker = '',
max_name_length = 18,
max_prefix_length = 15, -- prefix used when a buffer is de-duplicated
truncate_names = true, -- whether or not tab names should be truncated
tab_size = 18,
2024-04-10 16:09:58 +00:00
diagnostics = "nvim_lsp",
2023-02-12 17:26:24 +00:00
diagnostics_update_in_insert = false,
2024-04-10 16:09:58 +00:00
offsets = {
{
filetype = "NvimTree",
text = "File Explorer",
text_align = "left",
separator = true
}
},
2023-02-12 17:26:24 +00:00
color_icons = true, -- whether or not to add the filetype icon highlights
show_buffer_icons = true, -- disable filetype icons for buffers
2024-04-10 16:09:58 +00:00
show_buffer_close_icons = false,
2023-02-12 17:26:24 +00:00
show_close_icon = false,
show_tab_indicators = true,
show_duplicate_prefix = true, -- whether to show duplicate buffer prefix
2024-04-10 16:09:58 +00:00
duplicates_across_groups = true, -- whether to consider duplicate paths in different groups as duplicates
2023-02-12 17:26:24 +00:00
persist_buffer_sort = true, -- whether or not custom sorted buffers should persist
2024-04-10 16:09:58 +00:00
move_wraps_at_ends = false, -- whether or not the move command "wraps" at the first or last position
2023-02-12 17:26:24 +00:00
-- can also be a table containing 2 custom separators
-- [focused and unfocused]. eg: { '|', '|' }
separator_style = "thick",
2024-04-10 16:09:58 +00:00
enforce_regular_tabs = true,
2023-02-12 17:26:24 +00:00
always_show_bufferline = true,
hover = {
enabled = true,
delay = 200,
2024-04-10 16:09:58 +00:00
reveal = {'close'}
2023-02-12 17:26:24 +00:00
},
2024-04-10 16:09:58 +00:00
sort_by = 'tabs'
2023-02-12 17:26:24 +00:00
}
}
}