Skip to content

Commit

Permalink
fix: Use NvChad/nvim-colorizer as the upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
MysticalDevil committed Nov 5, 2023
1 parent 2954c2c commit c95843f
Showing 1 changed file with 30 additions and 3 deletions.
33 changes: 30 additions & 3 deletions lua/devil/configs/plugin/nvim-colorizer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,36 @@ if not status then
end

local opts = {
"*",
css = { rgb_fn = true, hsl_fn = true },
html = { names = false, rgb_fn = true, hsl_fn = true },
filetypes = {
"css",
"javascript",
css = { rgb_fn = true, hsl_fn = true },
html = { names = false, rgb_fn = true, hsl_fn = true },
},
user_default_options = {
RGB = true, -- #RGB hex codes
RRGGBB = true, -- #RRGGBB hex codes
names = true, -- "Name" codes like Blue or blue
RRGGBBAA = false, -- #RRGGBBAA hex codes
AARRGGBB = false, -- 0xAARRGGBB 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 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 = false,
},
-- all the sub-options of filetypes apply to buftypes
buftypes = {},
}

colorizer.setup(opts)

0 comments on commit c95843f

Please sign in to comment.