dev: removed color overrides util

dev-assets
Pocco81 3 years ago
parent fcd04a3cc9
commit ed3707a382

@ -71,9 +71,6 @@ colors.error = colors.red_bg
colors.warning = colors.yellow colors.warning = colors.yellow
colors.info = colors.blue colors.info = colors.blue
colors.hint = colors.white_br colors.hint = colors.white_br
colors.variable = colors.white colors.variable = colors.white
util.color_overrides(colors, opts)
return colors return colors

@ -71,9 +71,6 @@ colors.error = colors.red_bg
colors.warning = colors.yellow colors.warning = colors.yellow
colors.info = colors.blue colors.info = colors.blue
colors.hint = colors.white_br colors.hint = colors.white_br
colors.variable = colors.white colors.variable = colors.white
util.color_overrides(colors, opts)
return colors return colors

@ -67,35 +67,6 @@ function util.invertColor(color)
return color return color
end end
function util.color_overrides(colors, config)
if type(config.colors) == "table" then
for key, value in pairs(config.colors) do
if not colors[key] then
error("Color " .. key .. " does not exist")
end
-- Patch: https://github.com/ful1e5/onedark.nvim/issues/6
if type(colors[key]) == "table" then
util.color_overrides(colors[key], {colors = value})
else
if value:lower() == "none" then
-- set to none
colors[key] = "NONE"
elseif string.sub(value, 1, 1) == "#" then
-- hex override
colors[key] = value
else
-- another group
if not colors[value] then
error("Color " .. value .. " does not exist")
end
colors[key] = colors[value]
end
end
end
end
end
function util.string_to_color(colors, value, default) function util.string_to_color(colors, value, default)
if not value or value == "" then if not value or value == "" then
return default return default

Loading…
Cancel
Save