Files
nvimdots/lua/config/barbar.lua
T
Zacharias-Brohn d3465ff5cd lots of changes
2025-02-15 17:20:09 +01:00

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,
})
},
})