prettier-vscode
prettier-vscode copied to clipboard
Support prettier option `pluginSearchDirs`
The option pluginSearchDirs is supported by prettier's configuration file: https://prettier.io/docs/en/plugins.html#using-plugins.
Setting this option directly in the vscode extension will allow to manage the prettier's plugin discovery, definitely useful to workaround these issues: https://github.com/prettier/prettier/issues/8056 https://github.com/withastro/prettier-plugin-astro/issues/97
Think about this. Thank you. 😉
FYI: Prettier is removing this option.
@fisker any other ideas on how to solve those issues mentioned above (plugin(s) not detectable by vscode)?
Put {plugins: []} in your .prettierrc.
Yeah, tried that :/ but not working when installing with pnpm :/ EDIT: unless you mean to put an empty array, I didn't try that
If it doesn't work, it's bug in prettier, you can open an issue on prettier repo.
You can also try
// prettier.config.cjs
module.exports = {
plugins: [require("your-plugin")]
};
OR
// prettier.config.cjs
module.exports = {
plugins: [require.resolve("your-plugin")]
};
@fisker thanks for the suggestions, I will try those as well :)