config-neovim/lua/plugins/bufferline.lua
2024-09-07 22:51:37 +08:00

32 lines
967 B
Lua

return {
"akinsho/bufferline.nvim",
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,
}
},
}