-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
There has been quite a few requests for the extension to support class name completions in contexts other than a standard class(Name) attribute.
Some examples:
tailwind.macro
andtwin.macro
(Add scrolling-touch/auto docs #46, Support for tailwind.macro in styled/emotion like tw...
or tw.div...
tailwindcss-intellisense#123):tw`_` tw.div`_` <Component tw="_" />
tailwind-rn
(Add@important
at-rule #99):tailwind('_')
tailwind-ppx
(Algolia's DocSearch ready! ✨ #120):<Component className=[%tw "_"] />
I just wanted to consolidate all of these requests into a single issue that can be tracked more easily, as I think the solution could be the same for each of them.
I am reluctant to hard-code each of these cases into the extension because none of them are "official" methods of using Tailwind, and it may become a maintenance burden.
However, I am open to the idea of adding a user setting which would allow the definition of custom regular expressions. For example for tailwind-rn
your regular expression might be something like: /\btailwind\([^)]+/ig
If you're interested in this feature feel free to "watch" this issue for updates, and post any comments/suggestions you may have.