Skip to content

Commit

Permalink
remove unnecesarry fallback_if_none functionality in custom groups
Browse files Browse the repository at this point in the history
No longer needed with the new change in shader.
  • Loading branch information
ramojus committed Oct 27, 2024
1 parent 29f041d commit 12ea99b
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions lua/mellifluous/highlights/custom_groups.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
local M = {}

local function fallback_if_none(color, fallback_color)
if type(color) == "string" and color == "NONE" then
return fallback_color
end
return color
end

-- Any shared highlight groups that cannot be found in general highlights or
-- treesitter highlights are created here.
function M.get(colors)
Expand All @@ -17,11 +10,9 @@ function M.get(colors)
MainKeyword = { fg = colors.main_keywords, style = config.styles.main_keywords or {} },

IndentLine = function(bg)
bg = fallback_if_none(bg, colors.bg)
return { fg = shader.replicate_shade(colors.bg, colors.fg5, bg) }
end,
IndentLineInactive = function(bg)
bg = fallback_if_none(bg, colors.bg)
return {
fg = config.is_bg_dark and shader.replicate_shade(colors.bg, colors.bg4, bg)
or shader.replicate_shade(colors.bg, colors.dark_bg2, bg),
Expand All @@ -30,7 +21,6 @@ function M.get(colors)

MenuButton = { fg = colors.ui_blue },
MenuButtonSelected = function(bg)
bg = fallback_if_none(bg, colors.bg)
local applied_bg = config.is_bg_dark and shader.replicate_shade(colors.bg, colors.bg4, bg)
or shader.replicate_shade(colors.bg, colors.dark_bg2, bg)
return {
Expand Down

0 comments on commit 12ea99b

Please sign in to comment.