[IntelliSense] Add tailwindFunctions
á la Tailwind's Prettier plugin
#13036
happycollision
started this conversation in
Ideas
Replies: 1 comment
-
For what it's worth, you could try configuring the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Short summary via some imaginary settings
It would be so nice if the VSCode extension had the same
tailwindFunctions
feature that the Prettier plugin has so that we could get color swatches and definitions on hover for whatever strings we define within known functions.Here's a potential setting config and the resulting behavior:
The long version
The combination of Tailwind, Tailwind's Prettier plugin, and Tailwind's VSCode extension are extraordinary. The Prettier plugin has this cool feature that allows you to define a
tailwindFunctions
array of strings which informs Prettier which functions in your code are expected to contain Tailwind classes so it knows which strings to rearrange. That is such a great feature.I am sure you see where this is going: It would be so nice it the VSCode plugin had the same feature:
Hover a

className
attribute string (definition appears):Hover a function with string args inside a

className
attribute (definition appears):Hover a function registered with the Tailwind Prettier plugin (no class definition):

Being able to get color swatches and definitions for arbitrary strings would be great!
Beta Was this translation helpful? Give feedback.
All reactions