diff options
Diffstat (limited to 'ar/.config/TheSiahxyz')
| -rw-r--r-- | ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/colorizer.lua | 84 |
1 files changed, 15 insertions, 69 deletions
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 = { - { "<leader>zha", "<Cmd>ColorizerAttachToBuffer<CR>", desc = "Attach colorizer" }, - { "<leader>zhd", "<Cmd>ColorizerDetachFromBuffer<CR>", desc = "Detach colorizer" }, - { "<leader>zhr", "<Cmd>ColorizerReloadAllBuffers<CR>", desc = "Refresh colorizer" }, - { "<leader>zht", "<Cmd>ColorizerToggle<CR>", desc = "Toggle colorizer" }, + { "<leader>zht", "<Cmd>HighlightColorsToggle<CR>", desc = "Toggle colorizer" }, + { "<leader>zha", "<Cmd>HighlightColorsOn<CR>", desc = "Enable colorizer" }, + { "<leader>zhd", "<Cmd>HighlightColorsOff<CR>", desc = "Disable colorizer" }, }, } |
