zenbones-theme / zenbones.nvim

๐Ÿชจ A collection of contrast-based Vim/Neovim colorschemes
MIT License
714 stars 49 forks source link

Make `Folded` transparent as well if transparency is enabled #92

Closed wimstefan closed 2 years ago

wimstefan commented 2 years ago

The title says it all. It doesn't look consistent if everything has a transparent background except the folds. Would be a nice extra to have a consistent appearance ๐Ÿ˜

wimstefan commented 2 years ago

Since even I could resolve that with a simple change I can provide a patch ๐Ÿ˜

diff --git a/lua/zenbones/specs/dark.lua b/lua/zenbones/specs/dark.lua
index 00d7dc2..226d66b 100644
--- a/lua/zenbones/specs/dark.lua
+++ b/lua/zenbones/specs/dark.lua
@@ -68,7 +68,7 @@ local function generate(p, opt)
      LineNr          { fg = p1.bg.li(opt.lighten_line_nr or 35), bg = opt.solid_line_nr and p1.bg.li(4) or "NONE" }, -- Line number for ":number" and ":#" commands, and when 'number' or 'relativenumber' option is set.
      SignColumn      { LineNr }, -- column where |signs| are displayed
      FoldColumn      { LineNr, gui = "bold" }, -- 'foldcolumn'
-     Folded          { bg = p1.bg.li(14), fg = p1.bg.li(64) }, -- line used for closed folds
+     Folded          { bg = not opt.transparent_background and p1.bg.li(14) or "NONE", fg = p1.bg.li(64) }, -- line used for closed folds
      CursorLineNr    { LineNr, fg = p.fg, gui = "bold" }, -- Like LineNr when 'cursorline' or 'relativenumber' is set for the cursor line.

      -- ModeMsg      { }, -- 'showmode' message (e.g., "-- INSERT -- ")
diff --git a/lua/zenbones/specs/light.lua b/lua/zenbones/specs/light.lua
index 8318ef0..579d8da 100644
--- a/lua/zenbones/specs/light.lua
+++ b/lua/zenbones/specs/light.lua
@@ -68,7 +68,7 @@ local function generate(p, opt)
      LineNr          { fg = p1.bg.da(opt.darken_line_nr or 33), bg = opt.solid_line_nr and p1.bg.da(4) or "NONE" }, -- Line number for ":number" and ":#" commands, and when 'number' or 'relativenumber' option is set.
      SignColumn      { LineNr }, -- column where |signs| are displayed
      FoldColumn      { LineNr, gui = "bold" }, -- 'foldcolumn'
-     Folded          { bg = p1.bg.da(16), fg = p1.bg.da(64) }, -- line used for closed folds
+     Folded          { bg = not opt.transparent_background and p1.bg.da(16) or "NONE", fg = p1.bg.da(64) }, -- line used for closed folds
      CursorLineNr    { LineNr, fg = p.fg, gui = "bold" }, -- Like LineNr when 'cursorline' or 'relativenumber' is set for the cursor line.

      -- ModeMsg      { }, -- 'showmode' message (e.g., "-- INSERT -- ")
mcchrish commented 2 years ago

Yes, please create a PR ๐Ÿ˜„ Would also be great to see a before/after comparison.

wimstefan commented 2 years ago

Uhhhh I'm afraid that's beyond my possibilities ๐Ÿคจ I was hoping a simple patch as seen above would be enough. Comparisons are also not that easy since I'm using a folding plugin that might show a different picture than default folds.

wimstefan commented 2 years ago

Thank you so much!!! ๐Ÿ˜ƒ