NvChad/nvim-colorizer.lua

Bug: Tailwind does not work when `names` option is false

MrRoiz opened this issue · 2 comments

MrRoiz commented

Describe the bug
I wanted to set up this plugin to give colorizing support to tailwind classes but, I don't want to colorize every word matching with a color name, but tailwind option only seems to work when names option is true
image

To Reproduce
Set names option as false and then tailwind colorizing won't work anymore

Expected behavior
With names option set as false it should still work for tailwind classes

Screenshots

  • tailwind option set as true and names option to default
    image
  • tailwind option set as true and names options also set as true
    image

Operating System:
Ubuntu 22.10 x86_64

Neovim Version:
v0.9.0

Colorizer Version:
Command below does not print anything
find ~/.config/nvim/ -type d -name 'nvim-colorizer.lua' -exec git rev-parse HEAD \;
here's the installation data (from lazy)
image

Additional context
N/A

9mm commented

Also have this issue, I'm glad i found this.. thanks

Hi, I recently felt the urge to be able to highlight my own custom color names, so I did some work on the names parser also responsible for highlighting tailwind colors and I think it should easily fix your issue. In case you want to try my fork until it gets merged you'll have to put the tailwind config value into names, so it would be like: names='tailwind'|'tailwind_lsp'|'tailwind_both'

I hope it solves the issue for you without any side effects.