From f1ad90151267536c225768db0470b14a2270695d Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 29 Jul 2023 11:52:08 +0530 Subject: [PATCH] add transparency support for tabufline #217 --- lua/base46/integrations/tbline.lua | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/lua/base46/integrations/tbline.lua b/lua/base46/integrations/tbline.lua index 2370707..a182522 100644 --- a/lua/base46/integrations/tbline.lua +++ b/lua/base46/integrations/tbline.lua @@ -1,6 +1,8 @@ local colors = require("base46").get_theme_tb "base_30" -return { +local config = require("core.utils").load_config().ui + +local highlights = { TblineFill = { bg = colors.black2, @@ -21,7 +23,7 @@ return { bg = colors.black, }, - TbBufLineBufOffModified = { + TbLineBufOffModified = { fg = colors.red, bg = colors.black2, }, @@ -75,3 +77,21 @@ return { fg = colors.black, }, } + +local hlgroups_glassy = { + "TblineFill", + "TbLineBufOn", + "TbLineBufOff", + "TbLineBufOnClose", + "TbLineBufOffClose", + "TbLineBufOnModified", + "TbLineBufOffModified" +} + +if config.transparency then + for _, val in ipairs(hlgroups_glassy) do + highlights[val].bg = "NONE" + end +end + +return highlights