Skip to content

Commit

Permalink
Improve highlight colors
Browse files Browse the repository at this point in the history
  • Loading branch information
malob committed Apr 21, 2021
1 parent b1cbe08 commit d7aaa8d
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions configs/nvim/lua/lush_theme/malo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ local c = require'malo-theme'.colors

-- Function to set/update colors that are dependant on `vim.o.background`
local function choose(dark, light) return vim.o.background == 'dark' and dark or light end
local function highlight(c) return vim.o.background == 'dark' and c.lightness(20) or c.lightness(80) end

return require'lush'(function()
return {
Expand Down Expand Up @@ -62,6 +63,14 @@ return require'lush'(function()
FadedFg { fg = FadedBg.bg },
MutedFg { fg = MutedBg.bg },
StrongFg { fg = StrongBg.bg },
YellowHlBg { bg = highlight(c.yellow) },
OrangeHlBg { bg = highlight(c.orange) },
RedHlBg { bg = highlight(c.red) },
MagentaHlBg { bg = highlight(c.magenta) },
VioletHlBg { bg = highlight(c.violet) },
BlueHlBg { bg = highlight(c.blue) },
CyanHlBg { bg = highlight(c.cyan) },
GreenHlBg { bg = highlight(c.green) },

-- Misc
AddText { GreenFg },
Expand Down Expand Up @@ -161,18 +170,18 @@ return require'lush'(function()

-- Last search pattern highlighting (see 'hlsearch').
-- Also used for similar items that need to stand out.
Search { bg = c.yellow.lighten(70) },
Search { YellowHlBg },

-- 'incsearch' highlighting; also used for the text replaced with ":s///c"
IncSearch { bg = c.orange.lighten(70) },
IncSearch { OrangeHlBg },

-- |:substitute| replacement text highlighting
-- Sustitute { },

-- Selections ----------------------------------------------------------------------------------

-- Visual mode selection
Visual { bg = BlueBg.bg.lighten(70) },
Visual { BlueHlBg },

-- Visual mode selection when vim is "Not Owning the Selection".
VisualNOS { Normal, gui = 'reverse' },
Expand Down

0 comments on commit d7aaa8d

Please sign in to comment.