brenoprata10 / nvim-highlight-colors

Highlight colors for neovim
696 stars 32 forks source link

not working for named colors: `orange`, `deepskyblue` #102

Closed daUnknownCoder closed 4 months ago

daUnknownCoder commented 4 months ago

im doing this:

  -- Asynchronous highlight of HEX colors
  {
    "brenoprata10/nvim-highlight-colors",
    event = { "VeryLazy" },
    config = function()
      local nvim_highlight_colors_status_ok, nvim_highlight_colors = pcall(require, "nvim-highlight-colors")
      if not nvim_highlight_colors_status_ok then
        print("nvim_highlight_colors not found!")
      end
      nvim_highlight_colors.setup({
        render = "background",
        enable_hex = true,
        enable_short_hex = true,
        enable_rgb = true,
        enable_hsl = true,
        enable_var_usage = true,
        enable_named_colors = true,
        enable_tailwind = true,
        exclude_filetypes = { "text" },
      })
    end,
    lazy = true,
  },

but it doesnt work for named colors, i tested for hsl, rgb, #, tailwind and it works for them image

so how to solve this?

brenoprata10 commented 4 months ago

There is a safe guard in the plugin that exists to prevent false positives, named colors will get highlighted if they are being used as a value e.g. background: blue or background = blue. This was created to avoid highlighting situations like we love blueberries getting the blue part highlighted

daUnknownCoder commented 4 months ago

There is a safe guard in the plugin that exists to prevent false positives, named colors will get highlighted if they are being used as a value e.g. background: blue or background = blue. This was created to avoid highlighting situations like we love blueberries getting the blue part highlighted

but if you see the image, in the table, i have this virtext thing which has colors Orange and deepskyblue which are not getting highlighted and aint a false positive too? thoughts?