-
Notifications
You must be signed in to change notification settings - Fork 0
/
bufferline.lua
32 lines (31 loc) · 1.01 KB
/
bufferline.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
return {
"akinsho/bufferline.nvim",
event = "VeryLazy",
opts = function()
local bufferline = require("bufferline")
return {
options = {
themable = true,
style_preset = bufferline.style_preset.no_italic,
numbers = "ordinal",
close_command = function(bufnr)
require("mini.bufremove").delete(bufnr, false)
end,
indicator = { style = "icon" },
truncate_names = false,
diagnostics = "nvim_lsp",
diagnostics_indicator = function(_, _, diag)
local icons = require("util.ui").diagnostics
local indicator = (diag.error and icons.ERROR .. " " or "") .. (diag.warning and icons.WARN or "")
return vim.trim(indicator)
end,
separator_style = "thick",
},
}
end,
keys = {
{ "[b", "<cmd>BufferLineCyclePrev<cr>", desc = "previous buffer" },
{ "]b", "<cmd>BufferLineCycleNext<cr>", desc = "next buffer" },
{ "<leader>bc", "<cmd>BufferLinePickClose<cr>", desc = "close" },
},
}