Replies: 2 comments 2 replies
-
I'm dying for something like this. What did you end up doing in the interim? |
Beta Was this translation helpful? Give feedback.
2 replies
-
My workaround for this was to just create a script to find all attributes with the substring
I then edited my prettier command in
|
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.
-
Hello,
tailwindAttributes support only strict string equality match to check if it should sort the classes. (I verified it here : https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/44435611e1d8ea2a8b43017cff66cc1e81e32dc9/src/index.js#L194 , it use
Set.prototype.has
to check)Is it possible to support, like with
tailwindcss-intellisense
a placeholder syntax ?In our team, we develop with React, so our
tailwindcss-intellisense
classAttributes
config is["class", "className", ".*ClassName", "ngClass"]
. It's very usefull. With that, we have auto-completion inbodyClassName
props for example, we would like the auto-sort ability with that.If you agree, I can take time to purpose a PR with that feature. We can discuss on the placeholder syntax, using a new config key. From
tailwindcss-intellisense
it seems it transform the strings config to regex.Best regards
I've search in issues, discussions and PR. But I see no clear decision on this specific point. The PR rejected was more about the scope of (variable name vs html / jsx / template attributes) than generic class support attribute.
Beta Was this translation helpful? Give feedback.
All reactions