-
-
Notifications
You must be signed in to change notification settings - Fork 124
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
Plugin detection issue with prettier v3 #2215
Comments
Hi @mermshaus, thanks for the bug report! It seems that plugins now have to be registered explicitly, e.g. by passing @fisker has the implicit plugin registration been dropped? |
Hi everyone, thanks for the quick help! Adding the plugin configuration/CLI arguments solves this issue. There is one thing of note: If you have a global installation of prettier, plugin configuration won’t work (right now), at least not by simply specifying the package name. It’s possible to use an absolute path to a plugin’s entry point to work around this. E.g. |
@mermshaus I have tried your workaround with test.php <?php
if(1 ){ echo 2; }
?> prettier --log-level debug test.php \
--plugin /home/abc/.node_modules/lib/node_modules/@prettier/plugin-php/src/index.js \
--parser php Output:
|
@coffebar Specifying the full plugin path works for me, but I find this to be an annoying regression as this wasn't required previously with prettier v2 |
Downgraded to v2 since phpStorm uses global prettier & php plugin instances 👎🏼 |
Hi,
thanks for the prettier v3 update from yesterday!
I tried to update today but couldn’t figure out how to do it.
Works: prettier 2.8.8, plugin-php 0.19.0
Doesn't work: prettier 3.0.2, plugin-php 0.20.0
Maybe I’m making an obvious mistake, but I thought it couldn’t hurt to add this as an issue.
Thanks!
Marc
The text was updated successfully, but these errors were encountered: