diff options
| author | Nicholas Hall <root@ngha.ro> | 2026-04-29 20:42:44 -0500 |
|---|---|---|
| committer | Nicholas Hall <root@ngha.ro> | 2026-04-29 20:42:44 -0500 |
| commit | b834788f7dc110e4a4f79b0356f1293d6d129b13 (patch) | |
| tree | bef6e26d08963096e192292c8d597d7f3301e2ba /plugin/after/transparency.lua | |
| parent | 7041a218d5cdcb6131697078e4422deb457c6cf0 (diff) | |
| download | nvim-lazyvim.tar.xz nvim-lazyvim.zip | |
Omarchy lazyvimlazyvim
Diffstat (limited to 'plugin/after/transparency.lua')
| -rw-r--r-- | plugin/after/transparency.lua | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/plugin/after/transparency.lua b/plugin/after/transparency.lua new file mode 100644 index 0000000..add6fd6 --- /dev/null +++ b/plugin/after/transparency.lua @@ -0,0 +1,59 @@ +-- Make highlight groups transparent while preserving their other attributes +local function make_transparent(name) + local ok, hl = pcall(vim.api.nvim_get_hl, 0, { name = name, link = false }) + if ok then + hl.bg = nil + vim.api.nvim_set_hl(0, name, hl) + end +end + +local groups = { + -- transparent background + "Normal", + "NormalFloat", + "FloatBorder", + "Pmenu", + "Terminal", + "EndOfBuffer", + "FoldColumn", + "Folded", + "SignColumn", + "LineNr", + "CursorLineNr", + "NormalNC", + "WhichKeyFloat", + "TelescopeBorder", + "TelescopeNormal", + "TelescopePromptBorder", + "TelescopePromptTitle", + -- neotree + "NeoTreeNormal", + "NeoTreeNormalNC", + "NeoTreeVertSplit", + "NeoTreeWinSeparator", + "NeoTreeEndOfBuffer", + -- nvim-tree + "NvimTreeNormal", + "NvimTreeVertSplit", + "NvimTreeEndOfBuffer", + -- notify + "NotifyINFOBody", + "NotifyERRORBody", + "NotifyWARNBody", + "NotifyTRACEBody", + "NotifyDEBUGBody", + "NotifyINFOTitle", + "NotifyERRORTitle", + "NotifyWARNTitle", + "NotifyTRACETitle", + "NotifyDEBUGTitle", + "NotifyINFOBorder", + "NotifyERRORBorder", + "NotifyWARNBorder", + "NotifyTRACEBorder", + "NotifyDEBUGBorder", +} + +for _, name in ipairs(groups) do + make_transparent(name) +end |
