mirror of
https://github.com/CompeyDev/my-nvim-setup.git
synced 2024-12-13 21:40:37 +00:00
add default config for nvim-colorizer
This commit is contained in:
parent
60db2ec626
commit
e1dfaa7a45
2 changed files with 14 additions and 2 deletions
|
@ -2,7 +2,7 @@ local colors = {
|
||||||
white = "#c7b89d",
|
white = "#c7b89d",
|
||||||
darker_black = "#1e2122",
|
darker_black = "#1e2122",
|
||||||
black = "#222526", -- nvim bg
|
black = "#222526", -- nvim bg
|
||||||
black2 = "#26292a",
|
black2 = "#282b2c",
|
||||||
one_bg = "#2b2e2f",
|
one_bg = "#2b2e2f",
|
||||||
one_bg2 = "#3b3e3f",
|
one_bg2 = "#3b3e3f",
|
||||||
one_bg3 = "#313435",
|
one_bg3 = "#313435",
|
||||||
|
|
|
@ -56,7 +56,19 @@ end
|
||||||
M.colorizer = function()
|
M.colorizer = function()
|
||||||
local present, colorizer = pcall(require, "colorizer")
|
local present, colorizer = pcall(require, "colorizer")
|
||||||
if present then
|
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"
|
vim.cmd "ColorizerReloadAllBuffers"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue