55 lines
1.4 KiB
Lua
55 lines
1.4 KiB
Lua
return {
|
||
{
|
||
'akinsho/bufferline.nvim',
|
||
event = 'VeryLazy',
|
||
opts = {
|
||
options = {
|
||
-- :h bufferline-configuration
|
||
mode = 'tabs',
|
||
separator_style = {"╱", "╱"},
|
||
themable = true,
|
||
numbers = "ordinal",
|
||
show_close_icon = false,
|
||
show_buffer_close_icons = false,
|
||
diagnostics = true,
|
||
indicator = {
|
||
-- icon = ' ', -- this should be omitted if indicator style is not 'icon'
|
||
-- windows terminal sucks
|
||
style = 'none',
|
||
},
|
||
always_show_bufferline = true,
|
||
diagnostics_indicator = function(_, _, diag)
|
||
local icons = require('plex.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,
|
||
custom_areas = {
|
||
right = function()
|
||
local project_root = require('plex.lib.badge').project()
|
||
local result = {}
|
||
local part = {}
|
||
part.text = '%#BufferLineTab# ' .. project_root
|
||
table.insert(result, part)
|
||
|
||
-- Session indicator
|
||
if vim.v['this_session'] ~= '' then
|
||
table.insert(result, { text = '%#BufferLineTab# ' })
|
||
end
|
||
return result
|
||
end,
|
||
},
|
||
offsets = {
|
||
{
|
||
filetype = 'neo-tree',
|
||
text = 'Neo-tree',
|
||
highlight = 'Directory',
|
||
text_align = 'center',
|
||
},
|
||
},
|
||
|
||
},
|
||
},
|
||
},
|
||
}
|