config-neovim/lua/plugins/bufferline.lua
2024-05-09 11:58:42 +08:00

33 lines
1,002 B
Lua

return {
"akinsho/bufferline.nvim",
enabled = custom.full_feature,
main = "bufferline",
event = "VeryLazy",
keys = {
{ "]b", "<cmd>BufferLineCycleNext<cr>" },
{ "[b", "<cmd>BufferLineCyclePrev<cr>" },
{ ">b", "<cmd>BufferLineMoveNext<cr>" },
{ "<b", "<cmd>BufferLineMovePrev<cr>" },
},
opts = {
options = {
numbers = "ordinal",
diagnostics = "nvim_lsp",
diagnostics_indicator = function(count, level, diagnostics_dict, context)
local icon = level:match("error") and "" or ""
return " " .. icon .. count
end,
separator_style = "thick",
offsets = {
{
filetype = "neo-tree",
text = "neo-tree",
text_align = "center",
separator = true,
},
},
persist_buffer_sort = false,
}
},
}