diff --git a/lua/chadlights.lua b/lua/chadlights.lua index c2b1d0a..de3adcb 100644 --- a/lua/chadlights.lua +++ b/lua/chadlights.lua @@ -23,6 +23,14 @@ require "term_hl" local user_highlights = nvchad.load_config().ui.hl_override highlights = merge_tb(highlights, user_highlights) +-- local set_transparent = nvchad.load_config().ui.transparency +local ui = nvchad.load_config().ui + +if ui.transparency then + local glassy_hls = require "nv_glassy" + highlights = merge_tb(highlights, glassy_hls) +end + -- finally set all highlights :D for hl, col in pairs(highlights) do vim.api.nvim_set_hl(0, hl, col) diff --git a/lua/integrations/nvchad.lua b/lua/integrations/nvchad.lua index a163967..1c6f1e2 100644 --- a/lua/integrations/nvchad.lua +++ b/lua/integrations/nvchad.lua @@ -1,11 +1,8 @@ local colors = require("base46").get_colors "base_30" -local ui = nvchad.load_config().ui local black = colors.black -local black2 = colors.black2 local blue = colors.blue local darker_black = colors.darker_black -local folder_bg = colors.folder_bg local green = colors.green local grey = colors.grey local grey_fg = colors.grey_fg @@ -89,7 +86,6 @@ local defaults = { DiagnosticInformation = { fg = green }, -- whichkey - WhichKey = { fg = blue }, WhichKeySeparator = { fg = light_grey }, WhichKeyDesc = { fg = red }, @@ -97,37 +93,4 @@ local defaults = { WhichKeyValue = { fg = green }, } -if ui.transparency then - local hl_groups = { - "NormalFloat", - "Normal", - "Folded", - "NvimTreeNormal", - "NvimTreeNormalNC", - "TelescopeNormal", - "TelescopePrompt", - "TelescopeResults", - "TelescopeBorder", - "TelescopePromptBorder", - "TelescopePromptNormal", - "TelescopePromptPrefix", - } - - for index, _ in ipairs(hl_groups) do - defaults[hl_groups[index]] = { - bg = "NONE", - } - end - - defaults.NvimTreeWinSeparator = { - fg = grey, - bg = "NONE", - } - - defaults.TelescopeResultsTitle = { - fg = black, - bg = blue, - } -end - return defaults diff --git a/lua/nv_glassy.lua b/lua/nv_glassy.lua new file mode 100644 index 0000000..51e4e5c --- /dev/null +++ b/lua/nv_glassy.lua @@ -0,0 +1,48 @@ +local colors = require("base46").get_colors "base_30" + +local M = { + NvimTreeWinSeparator = { + fg = colors.one_bg2, + bg = "NONE", + }, + + TelescopeResultsTitle = { + fg = colors.black, + bg = colors.blue, + }, +} + +-- for hl groups which need bg = "NONE" only! +local hl_groups = { + "NormalFloat", + "Normal", + "Folded", + "NvimTreeNormal", + "NvimTreeNormalNC", + "NvimTreeCursorLine", + "TelescopeNormal", + "TelescopePrompt", + "TelescopeResults", + "TelescopePromptNormal", + "TelescopePromptPrefix", + "CursorLine", + "Pmenu", +} + +for _, groups in ipairs(hl_groups) do + M[groups] = { + bg = "NONE", + } +end + +M.TelescopeBorder = { + fg = colors.grey, + bg = "NONE", +} + +M.TelescopePromptBorder = { + fg = colors.grey, + bg = "NONE", +} + +return M