-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: support Tailwind automatic class sorting #14
Comments
Actually, adding this feature to leptosfmt may not be needed. I just found a tool called rustywind that already accomplishes this, and I set up an automatic file watcher in my IDE that runs rustywind on the current file (if it's a Rust file) whenever I save it. It also probably makes sense to leave the responsibility of Tailwind class sorting to an external tool, since Tailwind class sorting can also apply to code outside the
...will become this:
If you agree that this feature should be handled by an external tool like rustywind, feel free to close this issue. But it might be a good idea to add a mention of rustywind to the README, in case there are other Tailwind users who are also wondering about the same thing. |
This was my thought as well, unfortunately there is no such thing as a plugin system for rustfmt (like prettier has). On another note, I think the tailwind language server is regex based, so you could configure that to work with the leptos syntax as well (for auto-completions etc) |
Good to know. Getting auto-completions to work as well would be nice. |
I looked it up, you have a I will close this issue then, considering there are other solutions already out there. |
Tailwind supports automatic class sorting with Prettier. It would be nice if this formatter could somehow incorporate that functionality. Perhaps it could be an optional feature, that if enabled, would check if a class attribute was a string literal, and if so, it would sort the class names in that string similarly to how prettier-plugin-tailwindcss does it.
The text was updated successfully, but these errors were encountered: