Skip to content
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

Compatability with prettier-plugin-tailwindcss #4

Open
gaufde opened this issue Jan 9, 2024 · 0 comments
Open

Compatability with prettier-plugin-tailwindcss #4

gaufde opened this issue Jan 9, 2024 · 0 comments

Comments

@gaufde
Copy link

gaufde commented Jan 9, 2024

First of all, Thank you! Of all the Twig plugins for Prettier I have tried recently this is the only one that seems to work right now!

I don't know enough about how these things work, but I'm curious what it would take for this plugin to be compatible with prettier-plugin-tailwindcss.

Right now, I have both plugins working independently. What I mean by this is that I can see that tailwind classes are re-sorted when I save a .html file, and formatting is updated when I save a .twig or a .html.twig file. However, tailwind classes inside the .twig files are not re-sorted.

Is it possible to have both plugins work together? Or, does this quote from the prettier-plugin-tailwindcss readme mean that it might not be possible at all?

This plugin uses Prettier APIs that can only be used by one plugin at a time, making it incompatible with other Prettier plugins implemented the same way.
-https://github.com/tailwindlabs/prettier-plugin-tailwindcss#compatibility-with-other-prettier-plugins

I am using:

  • prettier 3.1.1
  • prettier-plugin-tailwindcss 0.5.11
  • @nsetyo/prettier-plugin-twig 0.1.4

This comment may be relevant to understanding how Prettier works: prettier/prettier#10261

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant