104 lines
3.3 KiB
Lua
104 lines
3.3 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 "TabLine"
|
|
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)
|
|
if buffer.is_focused then
|
|
return ""
|
|
end
|
|
return " "
|
|
end,
|
|
fg = "Normal"
|
|
},
|
|
{
|
|
text = function(buffer)
|
|
if buffer.is_modified then
|
|
return ' '
|
|
elseif buffer.is_readonly then
|
|
return ' '
|
|
else
|
|
return ' '
|
|
end
|
|
end
|
|
},
|
|
{
|
|
text = function(buffer) return buffer.devicon.icon end,
|
|
fg = function(buffer) return buffer.devicon.color end,
|
|
},
|
|
{
|
|
text = function(buffer) return ' ' .. buffer.filename .. ' ' end,
|
|
},
|
|
{
|
|
text = '',
|
|
on_click = function(_, _, _, _, buffer)
|
|
buffer:delete()
|
|
end
|
|
},
|
|
{
|
|
text = ' ',
|
|
}
|
|
},
|
|
tabs = {
|
|
placement = "right",
|
|
components = {
|
|
{
|
|
text = function(tabpage)
|
|
return ' ' .. tabpage.number .. ' '
|
|
end,
|
|
bg = function(tabpage)
|
|
if tabpage.is_active then
|
|
return "NormalNC"
|
|
end
|
|
return "TabLine"
|
|
end,
|
|
fg = function(tabpage)
|
|
if tabpage.is_active then
|
|
return "NormalNC"
|
|
end
|
|
return "TabLine"
|
|
end,
|
|
bold = true
|
|
},
|
|
},
|
|
},
|
|
sidebar = {
|
|
filetype = { "NvimTree", "neo-tree", "SidebarNvim" },
|
|
components = {
|
|
{
|
|
text = "",
|
|
bg = "ColorColumn"
|
|
}
|
|
},
|
|
},
|
|
}
|
|
}
|
|
}
|