mirror of
https://git.aramjonghu.nl/AramJonghu/nvim.git
synced 2026-03-22 09:41:10 +01:00
31 lines
955 B
Lua
31 lines
955 B
Lua
require("bufferline").setup ({
|
|
options = {
|
|
diagnostics = "nvim_lsp",
|
|
always_show_bufferline = true,
|
|
diagnostics_indicator = function(_, _, diag)
|
|
local icons = LazyVim.config.icons.diagnostics
|
|
local ret = (diag.error and icons.Error .. diag.error .. " " or "")
|
|
.. (diag.warning and icons.Warn .. diag.warning or "")
|
|
return vim.trim(ret)
|
|
end,
|
|
offsets = {
|
|
{
|
|
filetype = "neo-tree",
|
|
text = "Neo-tree",
|
|
highlight = "Directory",
|
|
text_align = "left",
|
|
},
|
|
{
|
|
filetype = "snacks_layout_box",
|
|
},
|
|
},
|
|
vim.api.nvim_create_autocmd({ "BufAdd", "BufDelete" }, {
|
|
callback = function()
|
|
vim.schedule(function()
|
|
pcall(nvim_bufferline)
|
|
end)
|
|
end,
|
|
})
|
|
},
|
|
})
|