From 72fbadaf704e60aa98a2f94044d5cc939437c813 Mon Sep 17 00:00:00 2001 From: servostar Date: Fri, 1 Dec 2023 18:33:05 +0100 Subject: [PATCH] updated cokeline --- lua/plugins/cokeline.lua | 57 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 52 insertions(+), 5 deletions(-) diff --git a/lua/plugins/cokeline.lua b/lua/plugins/cokeline.lua index bd13cb6..9d4b5ef 100644 --- a/lua/plugins/cokeline.lua +++ b/lua/plugins/cokeline.lua @@ -26,11 +26,20 @@ return { end, bold = function(buffer) return buffer.is_focused - end + end, }, components = { { - text = function(buffer) return ' ' .. buffer.devicon.icon end, + text = function(buffer) + if buffer.is_focused then + return "▎" + end + return " " + end, + fg = "Normal" + }, + { + text = function(buffer) return buffer.devicon.icon end, fg = function(buffer) return buffer.devicon.color end, }, { @@ -62,9 +71,46 @@ return { components = { { text = function(tabpage) - return '' .. tabpage.number - end - } + return ' ' .. tabpage.number .. ' ' + end, + bg = function(tabpage) + if tabpage.is_active then + return "TabLineSel" + end + return "ColorColumn" + end, + fg = function(tabpage) + if tabpage.is_active then + return "TabLine" + end + return "Normal" + end, + bold = true + }, + { + text = function(tabpage) + if tabpage.is_active then + return "󰅖 " + end + return "" + end, + on_click = function(_, _, _, _, tabpage) + tabpage:close() + end, + bg = function(tabpage) + if tabpage.is_active then + return "TabLineSel" + end + return "ColorColumn" + end, + fg = function(tabpage) + if tabpage.is_active then + return "TabLine" + end + return "Normal" + end, + bold = true + }, } }, sidebar = { @@ -72,6 +118,7 @@ return { components = { { text = "Explorer", + bg = "ColorColumn" } }, },