feat(color-tags): use nvim-colorizer instead of mini.hipatterns
nvim-colorizer provides more features and recognizes more types of color formats.
This commit is contained in:
@@ -116,4 +116,27 @@ return {
|
|||||||
opts = require('data.types').smearcursor,
|
opts = require('data.types').smearcursor,
|
||||||
keys = require('data.keys').smearcursor,
|
keys = require('data.keys').smearcursor,
|
||||||
},
|
},
|
||||||
|
{ -- nvim-colorizer
|
||||||
|
'catgoose/nvim-colorizer.lua',
|
||||||
|
event = 'BufReadPre',
|
||||||
|
lazy = true,
|
||||||
|
opts = {
|
||||||
|
lazy_load = true,
|
||||||
|
user_default_options = {
|
||||||
|
names = true,
|
||||||
|
RGB = true, -- #RGB hex codes
|
||||||
|
RGBA = true, -- #RGBA hex codes
|
||||||
|
RRGGBB = true, -- #RRGGBB hex codes
|
||||||
|
RRGGBBAA = true, -- #RRGGBBAA hex codes
|
||||||
|
AARRGGBB = true, -- 0xAARRGGBB hex codes
|
||||||
|
rgb_fn = true, -- CSS rgb() and rgba() functions
|
||||||
|
hsl_fn = true, -- CSS hsl() and hsla() functions
|
||||||
|
css = true,
|
||||||
|
css_fn = true,
|
||||||
|
tailwind = true, -- Enable tailwind colors
|
||||||
|
tailwind_opts = { update_names = true },
|
||||||
|
sass = { enable = true, parsers = { 'css' } }, -- Enable sass colors
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,18 +47,4 @@ return {
|
|||||||
opts = require('data.types').miniicons.opts,
|
opts = require('data.types').miniicons.opts,
|
||||||
init = require('data.types').miniicons.init,
|
init = require('data.types').miniicons.init,
|
||||||
},
|
},
|
||||||
{ -- mini.hipatterns
|
|
||||||
'echasnovski/mini.hipatterns',
|
|
||||||
version = false,
|
|
||||||
event = 'VeryLazy',
|
|
||||||
opts = function()
|
|
||||||
local hipatterns = require('mini.hipatterns')
|
|
||||||
return {
|
|
||||||
highlighters = {
|
|
||||||
-- Highlight hex color strings (`#rrggbb`) using that color
|
|
||||||
hex_color = hipatterns.gen_highlighter.hex_color(),
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user