modify configuration for bufferline

This commit is contained in:
leafee98 2023-12-14 19:59:42 +08:00
parent 78d671c682
commit 8ac25e0bc4

View file

@ -31,23 +31,30 @@ return {
enabled = custom.full_feature, enabled = custom.full_feature,
main = "bufferline", main = "bufferline",
event = "VeryLazy", event = "VeryLazy",
keys = {
{ "zn", "<cmd>BufferLineCycleNext<cr>" },
{ "zp", "<cmd>BufferLineCyclePrev<cr>" },
{ "zcn", "<cmd>BufferLineMoveNext<cr>" },
{ "zcp", "<cmd>BufferLineMovePrev<cr>" },
},
opts = { opts = {
options = { options = {
numbers = "both", numbers = "ordinal",
diagnostics = "nvim_lsp", diagnostics = "nvim_lsp",
separator_style = "slant", diagnostics_indicator = function(count, level, diagnostics_dict, context)
local icon = level:match("error") and "" or ""
return " " .. icon .. count
end,
separator_style = "thick",
offsets = { offsets = {
{ {
filetype = "NvimTree", filetype = "NvimTree",
text = "File Explorer", text = "Nvim Tree",
text_align = "center", text_align = "center",
separator = true, separator = true,
}, },
}, },
hover = { persist_buffer_sort = false,
delay = 200,
reveal = { "close" },
},
} }
}, },
}, },
@ -104,3 +111,4 @@ return {
end, end,
} }
} }