aboutsummaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/gruvbox/base.lua16
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