summaryrefslogtreecommitdiff
path: root/ar/.config/TheSiahxyz/lua
diff options
context:
space:
mode:
Diffstat (limited to 'ar/.config/TheSiahxyz/lua')
-rw-r--r--ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/colorizer.lua104
1 files changed, 56 insertions, 48 deletions
diff --git a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/colorizer.lua b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/colorizer.lua
index 7356619..a06c925 100644
--- a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/colorizer.lua
+++ b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/colorizer.lua
@@ -12,58 +12,66 @@ return {
end,
config = function()
require("colorizer").setup({
- filetypes = { "*" }, -- Filetype options. Accepts table like `user_default_options`
- buftypes = {}, -- Buftype options. Accepts table like `user_default_options`
- -- Boolean | List of usercommands to enable. See User commands section.
- user_commands = true, -- Enable all or some usercommands
- lazy_load = false, -- Lazily schedule buffer highlighting setup function
- user_default_options = {
- names = false, -- "Name" codes like Blue or red. Added from `vim.api.nvim_get_color_map()`
- names_opts = { -- options for mutating/filtering names.
- lowercase = true, -- name:lower(), highlight `blue` and `red`
- camelcase = true, -- name, highlight `Blue` and `Red`
- uppercase = true, -- name:upper(), highlight `BLUE` and `RED`
- strip_digits = false, -- ignore names with digits,
- -- highlight `blue` and `red`, but not `blue3` and `red4`
+ filetypes = { "*" },
+ buftypes = {},
+ user_commands = true,
+ lazy_load = false,
+ options = {
+ parsers = {
+ css = false, -- preset: enables names, hex, rgb, hsl, oklch
+ css_fn = false, -- preset: enables rgb, hsl, oklch
+ names = {
+ enable = false,
+ lowercase = true,
+ camelcase = true,
+ uppercase = true,
+ strip_digits = false,
+ custom = false, -- table|function|false
+ },
+ hex = {
+ default = false, -- default value for format keys (see above)
+ rgb = true, -- #RGB
+ rgba = false, -- #RGBA
+ rrggbb = false, -- #RRGGBB
+ rrggbbaa = false, -- #RRGGBBAA
+ aarrggbb = false, -- 0xAARRGGBB
+ },
+ rgb = { enable = true },
+ hsl = { enable = false },
+ oklch = { enable = false },
+ tailwind = {
+ enable = true, -- parse Tailwind color names
+ lsp = true, -- use Tailwind LSP documentColor
+ update_names = true,
+ },
+ sass = {
+ enable = false,
+ parsers = { css = true },
+ variable_pattern = "^%$([%w_-]+)",
+ },
+ xterm = { enable = false },
+ custom = {},
},
- -- Expects a table of color name to #RRGGBB value pairs. # is optional
- -- Example: { cool = "#107dac", ["notcool"] = "#ee9240" }
- -- Set to false to disable, for example when setting filetype options
- names_custom = false, -- Custom names to be highlighted: table|function|false
- RGB = true, -- #RGB hex codes
- RGBA = true, -- #RGBA hex codes
- RRGGBB = true, -- #RRGGBB hex codes
- RRGGBBAA = true, -- #RRGGBBAA hex codes
- AARRGGBB = false, -- 0xAARRGGBB hex codes
- rgb_fn = true, -- CSS rgb() and rgba() functions
- hsl_fn = true, -- CSS hsl() and hsla() functions
- css = true, -- Enable all CSS *features*:
- -- names, RGB, RGBA, RRGGBB, RRGGBBAA, AARRGGBB, rgb_fn, hsl_fn
- css_fn = false, -- Enable all CSS *functions*: rgb_fn, hsl_fn
- -- Tailwind colors. boolean|'normal'|'lsp'|'both'. True sets to 'normal'
- tailwind = true, -- Enable tailwind colors
- tailwind_opts = { -- Options for highlighting tailwind names
- update_names = false, -- When using tailwind = 'both', update tailwind names from LSP results. See tailwind section
+ display = {
+ mode = "background", -- "background"|"foreground"|"virtualtext"
+ background = {
+ bright_fg = "#000000",
+ dark_fg = "#ffffff",
+ },
+ virtualtext = {
+ char = "■",
+ position = "eol", -- "eol"|"before"|"after"
+ hl_mode = "foreground",
+ },
+ priority = {
+ default = 150, -- vim.hl.priorities.diagnostics
+ lsp = 200, -- vim.hl.priorities.user
+ },
},
- -- parsers can contain values used in `user_default_options`
- sass = { enable = false, parsers = { "css" } }, -- Enable sass colors
- -- Highlighting mode. 'background'|'foreground'|'virtualtext'
- mode = "background", -- Set the display mode
- -- Virtualtext character to use
- virtualtext = "■",
- -- Display virtualtext inline with color. boolean|'before'|'after'. True sets to 'after'
- virtualtext_inline = false,
- -- Virtualtext highlight mode: 'background'|'foreground'
- virtualtext_mode = "foreground",
- -- update color values even if buffer is not focused
- -- example use: cmp_menu, cmp_docs
- always_update = false,
- -- hooks to invert control of colorizer
hooks = {
- -- called before line parsing. Accepts boolean or function that returns boolean
- -- see hooks section below
- disable_line_highlight = false,
+ should_highlight_line = false, -- function(line, bufnr, line_num) -> bool
},
+ always_update = false,
},
})
end,