81 lines
2.4 KiB
Lua
81 lines
2.4 KiB
Lua
|
return {
|
||
|
{
|
||
|
"willothy/nvim-cokeline",
|
||
|
config = true,
|
||
|
opts = {
|
||
|
show_if_buffers_are_at_least = 1,
|
||
|
buffers = {
|
||
|
focus_on_delete = "next",
|
||
|
new_buffers_position = 'last',
|
||
|
},
|
||
|
mappings = {
|
||
|
disable_mouse = false,
|
||
|
},
|
||
|
default_hl = {
|
||
|
bg = function(buffer)
|
||
|
if buffer.is_focused then
|
||
|
return "Normal"
|
||
|
end
|
||
|
return "ColorColumn"
|
||
|
end,
|
||
|
fg = function(buffer)
|
||
|
if buffer.is_focused then
|
||
|
return "Normal"
|
||
|
end
|
||
|
return "TabLine"
|
||
|
end,
|
||
|
bold = function(buffer)
|
||
|
return buffer.is_focused
|
||
|
end
|
||
|
},
|
||
|
components = {
|
||
|
{
|
||
|
text = function(buffer) return ' ' .. buffer.devicon.icon end,
|
||
|
fg = function(buffer) return buffer.devicon.color end,
|
||
|
},
|
||
|
{
|
||
|
text = function(buffer) return ' ' .. buffer.filename .. ' ' end,
|
||
|
},
|
||
|
{
|
||
|
text = function(buffer)
|
||
|
if buffer.is_modified then
|
||
|
return ' '
|
||
|
elseif buffer.is_readonly then
|
||
|
return ' '
|
||
|
else
|
||
|
return ''
|
||
|
end
|
||
|
end
|
||
|
},
|
||
|
{
|
||
|
text = '',
|
||
|
on_click = function(_, _, _, _, buffer)
|
||
|
buffer:delete()
|
||
|
end
|
||
|
},
|
||
|
{
|
||
|
text = ' ',
|
||
|
}
|
||
|
},
|
||
|
tabs = {
|
||
|
placement = "right",
|
||
|
components = {
|
||
|
{
|
||
|
text = function(tabpage)
|
||
|
return '' .. tabpage.number
|
||
|
end
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
sidebar = {
|
||
|
filetype = { "NvimTree", "neo-tree", "SidebarNvim" },
|
||
|
components = {
|
||
|
{
|
||
|
text = "Explorer",
|
||
|
}
|
||
|
},
|
||
|
},
|
||
|
}
|
||
|
}
|
||
|
}
|