nvim-config
This commit is contained in:
parent
3338d39206
commit
ad5d34530f
14 changed files with 563 additions and 33 deletions
63
lua/custom/plugins/bufferline.lua
Normal file
63
lua/custom/plugins/bufferline.lua
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
return {
|
||||
'akinsho/bufferline.nvim',
|
||||
version = '*',
|
||||
dependencies = {
|
||||
'nvim-tree/nvim-web-devicons',
|
||||
},
|
||||
config = function()
|
||||
require('bufferline').setup {
|
||||
options = {
|
||||
mode = 'buffers', -- set to "tabs" to only show tabpages instead
|
||||
themable = true,
|
||||
numbers = 'none', -- "none" | "ordinal" | "buffer_id" | "both"
|
||||
close_command = 'bdelete! %d',
|
||||
right_mouse_command = 'bdelete! %d',
|
||||
left_mouse_command = 'buffer %d',
|
||||
middle_mouse_command = nil,
|
||||
indicator = {
|
||||
icon = '▎',
|
||||
style = 'icon', -- 'icon' | 'underline' | 'none'
|
||||
},
|
||||
buffer_close_icon = '',
|
||||
modified_icon = '●',
|
||||
close_icon = '',
|
||||
left_trunc_marker = '',
|
||||
right_trunc_marker = '',
|
||||
max_name_length = 18,
|
||||
max_prefix_length = 15,
|
||||
truncate_names = true,
|
||||
tab_size = 18,
|
||||
diagnostics = 'nvim_lsp',
|
||||
diagnostics_update_in_insert = false,
|
||||
diagnostics_indicator = function(count, level, diagnostics_dict, context)
|
||||
local icon = level:match('error') and ' ' or ' '
|
||||
return ' ' .. icon .. count
|
||||
end,
|
||||
offsets = {
|
||||
{
|
||||
filetype = 'NvimTree',
|
||||
text = 'File Explorer',
|
||||
text_align = 'center',
|
||||
separator = true,
|
||||
},
|
||||
},
|
||||
color_icons = true,
|
||||
show_buffer_icons = true,
|
||||
show_buffer_close_icons = true,
|
||||
show_close_icon = true,
|
||||
show_tab_indicators = true,
|
||||
show_duplicate_prefix = true,
|
||||
persist_buffer_sort = true,
|
||||
separator_style = 'thin', -- "slant" | "slope" | "thick" | "thin" | { 'any', 'any' }
|
||||
enforce_regular_tabs = false,
|
||||
always_show_bufferline = true,
|
||||
hover = {
|
||||
enabled = true,
|
||||
delay = 200,
|
||||
reveal = { 'close' },
|
||||
},
|
||||
sort_by = 'insert_after_current',
|
||||
},
|
||||
}
|
||||
end,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue