pojokcodeid.nvim-lazy/lua/user/colorizer.lua

24 lines
879 B
Lua
Raw Normal View History

2023-01-15 00:17:41 +07:00
local status_ok, colorizer_cfg = pcall(require, "colorizer")
if not status_ok then
return
end
colorizer_cfg.setup({
2024-03-24 10:12:20 +07:00
DEFAULT_OPTIONS = {
RGB = true, -- #RGB hex codes
RRGGBB = true, -- #RRGGBB hex codes
names = true, -- "Name" codes like Blue
RRGGBBAA = true, -- #RRGGBBAA hex codes
rgb_fn = true, -- CSS rgb() and rgba() functions
hsl_fn = true, -- CSS hsl() and hsla() functions
css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB
css_fn = true, -- Enable all CSS *functions*: rgb_fn, hsl_fn
-- Available modes: foreground, background
mode = "background", -- Set the display mode.
},
2023-01-15 00:17:41 +07:00
filetypes = {
"*", -- Highlight all files, but customize some others.
css = { rgb_fn = true }, -- Enable parsing rgb(...) functions in css.
html = { names = false }, -- Disable parsing "names" like Blue or Gray
},
})