diff options
| author | Ellison <ellisonleao@gmail.com> | 2021-04-20 18:11:18 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-20 18:11:18 -0300 |
| commit | 682f6ff8afc5630c380310449047f14bed1c4f6d (patch) | |
| tree | 9271034a3ad1d437660ecce9fa91fbf3f79b81dc | |
| parent | d789a807695ba95de1afbc0359db95854cf4171a (diff) | |
| parent | bfca2548ef699ae7c32ced931aa7cc0f9039ec70 (diff) | |
| download | gruvbox-682f6ff8afc5630c380310449047f14bed1c4f6d.tar.gz gruvbox-682f6ff8afc5630c380310449047f14bed1c4f6d.tar.xz | |
Merge pull request #39 from uggedal/fix-light-contrast
fix hard/soft contrast with light background
| -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 |
