nvim.d/nvim/lua/plugins/config/bufferline.lua
Dan Anglin 587131d09d
chore: upgrade neovim plugins
Upgrade neovim plugins as part of the neovim upgrade to v0.10.0
2024-06-29 09:21:56 +01:00

36 lines
1,022 B
Lua

local ok, bufferline = pcall(require, "bufferline")
if not ok then
return
end
bufferline.setup{
options = {
always_show_bufferline = true,
mode = "buffers",
color_icons = true,
show_buffer_icons = true,
show_buffer_close_icons = false,
show_close_icon = false,
show_tab_indicators = true,
separator_style = "slant",
diagnostics = "nvim_lsp",
diagnostics_update_in_insert = true,
diagnostics_indicator = function(count, level, diagnostics_dict, context)
local s = ""
for e, n in pairs(diagnostics_dict) do
local sym = e == "error" and ""
or (e == "warning" and "" or "" )
s = s .. n .. sym
end
return s
end,
numbers = function(opts)
return string.format("[%s]%s", opts.id, opts.raise(opts.ordinal))
end,
get_element_icon = function(element)
local icon, hl = require('nvim-web-devicons').get_icon_by_filetype(element.filetype, { default = false })
return icon, hl
end,
}
}