From 7c80e1ac4dc7a60c89d5770ac2412f8a6fcbf503 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ellison=20Lea=CC=83o?= Date: Sat, 8 Jan 2022 22:46:08 -0300 Subject: stylua --- lua/gruvbox/base.lua | 50 +++++++++++++++++++++++++------------------------- lua/gruvbox/utils.lua | 26 +++++++++++++------------- 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/lua/gruvbox/base.lua b/lua/gruvbox/base.lua index 6e206fe..e4e5708 100644 --- a/lua/gruvbox/base.lua +++ b/lua/gruvbox/base.lua @@ -26,37 +26,37 @@ local gray = colors.gray local bg = vim.o.background if bg == nil then - bg = "dark" - vim.o.background = bg + bg = "dark" + vim.o.background = bg end -- swap colors if light mode if bg == "light" then - bg0 = colors.light0 - bg1 = colors.light1 - bg2 = colors.light2 - bg3 = colors.light3 - bg4 = colors.light4 - fg0 = colors.dark0 - fg1 = colors.dark1 - fg2 = colors.dark2 - fg3 = colors.dark3 - fg4 = colors.dark4 - red = colors.faded_red - green = colors.faded_green - yellow = colors.faded_yellow - blue = colors.faded_blue - purple = colors.faded_purple - aqua = colors.faded_aqua - orange = colors.faded_orange + bg0 = colors.light0 + bg1 = colors.light1 + bg2 = colors.light2 + bg3 = colors.light3 + bg4 = colors.light4 + fg0 = colors.dark0 + fg1 = colors.dark1 + fg2 = colors.dark2 + fg3 = colors.dark3 + fg4 = colors.dark4 + red = colors.faded_red + green = colors.faded_green + yellow = colors.faded_yellow + blue = colors.faded_blue + purple = colors.faded_purple + aqua = colors.faded_aqua + 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"] + bg0 = colors[bg .. "0_hard"] elseif contrast == "soft" then - bg0 = colors[bg .. "0_soft"] + bg0 = colors[bg .. "0_soft"] end -- extending colors table with basic names for easy customization in g:gruvbox_* options @@ -95,10 +95,10 @@ local special_string_bg = bg1 local special_string_gui = styles.italic_strings if not utils.tobool(vim.g.gruvbox_improved_strings) then - improved_strings_fg = green - improved_strings_bg = nil - special_string_bg = nil - special_string_gui = nil + improved_strings_fg = green + improved_strings_bg = nil + special_string_bg = nil + special_string_gui = nil end -- neovim terminal mode colors diff --git a/lua/gruvbox/utils.lua b/lua/gruvbox/utils.lua index c6e3f11..f9b5ccf 100644 --- a/lua/gruvbox/utils.lua +++ b/lua/gruvbox/utils.lua @@ -2,25 +2,25 @@ local M = {} M.tobool = function(val) - if val == 0 or not val then - return false - end - return true + if val == 0 or not val then + return false + end + return true end -- check if vim.g.gruvbox_* color exists in current palette, return default color -- otherwise M.get_color_from_var = function(color, default, colors) - if color == nil then - return default - end + if color == nil then + return default + end - local c = colors[color] - if c == nil then - print(string.format("%s color could not be found, using default", color)) - return default - end - return c + local c = colors[color] + if c == nil then + print(string.format("%s color could not be found, using default", color)) + return default + end + return c end M.merge = function(tbls) -- cgit v1.2.3