diff options
| author | Eivind Uggedal <eivind@uggedal.com> | 2021-04-20 18:15:48 +0200 |
|---|---|---|
| committer | Eivind Uggedal <eivind@uggedal.com> | 2021-04-20 18:15:48 +0200 |
| commit | bfca2548ef699ae7c32ced931aa7cc0f9039ec70 (patch) | |
| tree | 9271034a3ad1d437660ecce9fa91fbf3f79b81dc | |
| parent | d789a807695ba95de1afbc0359db95854cf4171a (diff) | |
| download | gruvbox-bfca2548ef699ae7c32ced931aa7cc0f9039ec70.tar.gz gruvbox-bfca2548ef699ae7c32ced931aa7cc0f9039ec70.tar.xz | |
fix hard/soft contrast with light background
Light overrides was also overriding hard/soft bg
| -rw-r--r-- | lua/gruvbox/base.lua | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lua/gruvbox/base.lua b/lua/gruvbox/base.lua index 1e587e4..d4d396e 100644 --- a/lua/gruvbox/base.lua +++ b/lua/gruvbox/base.lua @@ -26,20 +26,12 @@ local aqua = colors.bright_aqua local orange = colors.bright_orange local gray = colors.gray --- handle light/dark contrast settings local bg = vim.o.background if bg == nil then bg = "dark" vim.o.background = bg end -local contrast = vim.g["gruvbox_contrast_" .. bg] -if contrast == "hard" then - bg0 = colors[bg .. "0_hard"] -elseif contrast == "soft" then - bg0 = colors[bg .. "0_soft"] -end - -- swap colors if light mode if bg == "light" then bg0 = colors.light0 @@ -61,6 +53,14 @@ if bg == "light" then orange = colors.faded_orange end +-- handle light/dark contrast settings +local contrast = vim.g["gruvbox_contrast_" .. bg] +if contrast == "hard" then + bg0 = colors[bg .. "0_hard"] +elseif contrast == "soft" then + bg0 = colors[bg .. "0_soft"] +end + -- extending colors table with basic names for easy customization in g:gruvbox_* options colors.bg0 = bg0 colors.bg1 = bg1 |
