From e1dfaa7a453d91dc19daf76ed9ea852f2234aa83 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 30 Aug 2021 05:54:31 +0530 Subject: [PATCH] add default config for nvim-colorizer --- lua/colors/themes/gruvchad.lua | 2 +- lua/plugins/configs/others.lua | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/lua/colors/themes/gruvchad.lua b/lua/colors/themes/gruvchad.lua index b51d968..2142f2b 100644 --- a/lua/colors/themes/gruvchad.lua +++ b/lua/colors/themes/gruvchad.lua @@ -2,7 +2,7 @@ local colors = { white = "#c7b89d", darker_black = "#1e2122", black = "#222526", -- nvim bg - black2 = "#26292a", + black2 = "#282b2c", one_bg = "#2b2e2f", one_bg2 = "#3b3e3f", one_bg3 = "#313435", diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index a7f36a6..9b7ac0b 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -56,7 +56,19 @@ end M.colorizer = function() local present, colorizer = pcall(require, "colorizer") if present then - colorizer.setup() + colorizer.setup({ "*" }, { + RGB = true, -- #RGB hex codes + RRGGBB = true, -- #RRGGBB hex codes + names = false, -- "Name" codes like Blue + RRGGBBAA = false, -- #RRGGBBAA hex codes + rgb_fn = false, -- CSS rgb() and rgba() functions + hsl_fn = false, -- CSS hsl() and hsla() functions + css = false, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB + css_fn = false, -- Enable all CSS *functions*: rgb_fn, hsl_fn + + -- Available modes: foreground, background + mode = "background", -- Set the display mode. + }) vim.cmd "ColorizerReloadAllBuffers" end end