nvim-config/lua/configs/colorizer.lua

26 lines
688 B
Lua
Raw Normal View History

local M = {}
function M.config()
2023-01-10 18:21:09 +00:00
local present, colorizer = pcall(require, 'colorizer')
if not present then
return
end
colorizer.setup(
2023-01-10 18:21:09 +00:00
{ '*' }, -- Highlight all files, but customize some others
{
2023-01-10 18:21:09 +00:00
RGB = true, -- #RGB hex codes
RRGGBB = true, -- #RRGGBB hex codes
names = false, -- "Name" codes like Blue
RRGGBBAA = false, -- #RRGGBBAA hex codes
2023-01-10 18:21:09 +00:00
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
mode = 'foreground', -- Set the display mode
}
)
end
return M