fix(ts-rainbow): respect transparent_background

When setting nvim-ts-rainbow highlight groups, do not set a background highlight if  is
dev
Alexander Garcia 3 years ago
parent 5b5a0dded1
commit 4aac8765c6

@ -1,14 +1,16 @@
local M = {} local M = {}
function M.get(cp) function M.get(cp)
local transparent_background = require("catppuccin.config").options.transparent_background
local bg_highlight = transparent_background and nil or cp.black2
return { return {
rainbowcol1 = {bg = cp.black2, fg = cp.red}, rainbowcol1 = {bg = bg_highlight, fg = cp.red},
rainbowcol2 = {bg = cp.black2, fg = cp.teal}, rainbowcol2 = {bg = bg_highlight, fg = cp.teal},
rainbowcol3 = {bg = cp.black2, fg = cp.yellow}, rainbowcol3 = {bg = bg_highlight, fg = cp.yellow},
rainbowcol4 = {bg = cp.black2, fg = cp.blue}, rainbowcol4 = {bg = bg_highlight, fg = cp.blue},
rainbowcol5 = {bg = cp.black2, fg = cp.pink}, rainbowcol5 = {bg = bg_highlight, fg = cp.pink},
rainbowcol6 = {bg = cp.black2, fg = cp.flamingo}, rainbowcol6 = {bg = bg_highlight, fg = cp.flamingo},
rainbowcol7 = {bg = cp.black2, fg = cp.green}, rainbowcol7 = {bg = bg_highlight, fg = cp.green},
} }
end end

Loading…
Cancel
Save