nvim-colorizer.lua icon indicating copy to clipboard operation
nvim-colorizer.lua copied to clipboard

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

Open MrRoiz opened this issue 2 years ago • 2 comments

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

MrRoiz avatar May 04 '23 23:05 MrRoiz

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

9mm avatar Sep 14 '23 16:09 9mm

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.

litoj avatar Nov 20 '23 20:11 litoj