-
-
Notifications
You must be signed in to change notification settings - Fork 458
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
Detect global installation of prettier/plugin-php #2564
Comments
I'm experiencing the same issue with @prettier/plugin-php@0.18.8 and prettier-plugin-css-order@1.2.0. I'm on Mac OS 12.4. It would be nice to not have to install the NPM libraries locally for every project. |
Not something i am planning on doing as the official recommendation is against using global extensions: https://prettier.io/docs/en/install.html |
I figured a work around by adding this to my workspace settings json. {
"prettier.prettierPath": "/usr/local/lib/node_modules/prettier"
} |
Thanks very much for reply and clarification! (For interested readers: There is also a setting |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Is your feature request related to a problem? Please describe.
The php plugin for prettier (https://github.com/prettier/plugin-php) is supported by prettier-vscode, but only when plugin-php is installed locally via yarn/npm:
A global installation is not detected by prettier-vscode:
This is also mentioned here: https://github.com/prettier/plugin-php#vscode
Describe the solution you'd like
It would be great if a global installation of prettier/plugin-php could be used when no local package is detected. It would make it a lot easier to use this extension throughout multiple (PHP) projects. Currently for every project you need to run
npm install --save-dev prettier @prettier/plugin-php
andnpm install
, even if no other npm packages are used by the project.(Additionally it would be totally awesome if the php plugin could be installed inside of the vscode extension of course. I don't know the technical details of this extension yet.)
Describe alternatives you've considered
None
Additional context
Thanks very much for providing this extension!
The text was updated successfully, but these errors were encountered: