From 8ac25e0bc405112df2a292439755b3f3c5dd6249 Mon Sep 17 00:00:00 2001 From: leafee98 Date: Thu, 14 Dec 2023 19:59:42 +0800 Subject: [PATCH] modify configuration for bufferline --- lua/plugins/10-editor.lua | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/lua/plugins/10-editor.lua b/lua/plugins/10-editor.lua index 93bc542..a6e0395 100644 --- a/lua/plugins/10-editor.lua +++ b/lua/plugins/10-editor.lua @@ -31,23 +31,30 @@ return { enabled = custom.full_feature, main = "bufferline", event = "VeryLazy", + keys = { + { "zn", "BufferLineCycleNext" }, + { "zp", "BufferLineCyclePrev" }, + { "zcn", "BufferLineMoveNext" }, + { "zcp", "BufferLineMovePrev" }, + }, opts = { options = { - numbers = "both", + numbers = "ordinal", 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 = { { filetype = "NvimTree", - text = "File Explorer", + text = "Nvim Tree", text_align = "center", separator = true, }, }, - hover = { - delay = 200, - reveal = { "close" }, - }, + persist_buffer_sort = false, } }, }, @@ -104,3 +111,4 @@ return { end, } } +