From 11615eb131972034e24be9d0bfd7960daad19aac Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Thu, 19 Mar 2026 14:22:18 +0900 Subject: modified plugins/colorizer.lua --- .../lua/TheSiahxyz/plugins/colorizer.lua | 84 ++++------------------ 1 file changed, 15 insertions(+), 69 deletions(-) (limited to 'ar/.config') diff --git a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/colorizer.lua b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/colorizer.lua index a06c925..07242ae 100644 --- a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/colorizer.lua +++ b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/colorizer.lua @@ -1,8 +1,6 @@ return { - "catgoose/nvim-colorizer.lua", + "brenoprata10/nvim-highlight-colors", event = "BufReadPre", - opts = { -- set to setup table - }, init = function() local wk = require("which-key") wk.add({ @@ -11,74 +9,22 @@ return { }) end, config = function() - require("colorizer").setup({ - 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 = {}, - }, - 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 - }, - }, - hooks = { - should_highlight_line = false, -- function(line, bufnr, line_num) -> bool - }, - always_update = false, - }, + require("nvim-highlight-colors").setup({ + render = "background", -- "background" | "foreground" | "virtual" + enable_hex = true, + enable_short_hex = true, + enable_rgb = true, + enable_hsl = false, + enable_var_usage = true, + enable_named_colors = false, + enable_tailwind = true, + virtual_symbol = "■", + virtual_symbol_position = "eol", -- "eol" | "before" | "after" }) end, keys = { - { "zha", "ColorizerAttachToBuffer", desc = "Attach colorizer" }, - { "zhd", "ColorizerDetachFromBuffer", desc = "Detach colorizer" }, - { "zhr", "ColorizerReloadAllBuffers", desc = "Refresh colorizer" }, - { "zht", "ColorizerToggle", desc = "Toggle colorizer" }, + { "zht", "HighlightColorsToggle", desc = "Toggle colorizer" }, + { "zha", "HighlightColorsOn", desc = "Enable colorizer" }, + { "zhd", "HighlightColorsOff", desc = "Disable colorizer" }, }, } -- cgit v1.2.3