12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- -- "#FF00FF"
- local opts = {
- filetypes = {
- "*",
- --"!lazy",
- },
- user_default_options = {
- -- Color names like RED
- names = true,
- -- #RGB Hex codes
- RGB = true,
- -- #RRGGBB Hex codes
- RRGGBB = true,
- -- #RRGGBBAA Hex
- RRGGBBAA = false,
- -- 0xAARRGGBB Hex codes
- AARRGGBB = false,
- -- CSS rgb() and rgba() functions
- rgb_fn = false,
- -- CSS hsl() and hsla() functions
- hsl_fn = false,
- -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB
- css = false,
- -- Enable all CSS *functions*: rgb_fn, hsl_fn
- css_fn = false,
- -- Available modes for `mode`: foreground, background, virtualtext
- mode = "background", -- Set the display mode.
- -- Available methods are false / true / "normal" / "lsp" / "both"
- -- True is same as normal
- tailwind = false, -- Enable tailwind colors
- -- parsers can contain values used in |user_default_options|
- sass = { enable = false, parsers = { "css" } }, -- Enable sass colors
- virtualtext = "■",
- -- update color values even if buffer is not focused
- -- example use: cmp_menu, cmp_docs
- always_update = true,
- },
- -- all the sub-options of filetypes apply to buftypes
- -- buftypes = {},
- }
- require("colorizer").setup(opts)
- -- execute colorizer as soon as possible
- vim.defer_fn(function()
- require("colorizer").attach_to_buffer(0)
- end, 0)
|