Description
Is your feature request related to a problem? Please describe.
When using prettier with non-javascript languages, it requires the setup of the plugin within the project's package.json
as the docs indicate is required for plugin support. This makes sense when using prettier as a node module executed from the command line, but that doesn't make a lot of sense when using Prettier from the context of a visual studio extension. This problem is exasperated by the fact if you are intending to use a plugin, you likely aren't using JavaScript for that project.
Describe the solution you'd like
I propose adding the following settings.json entry: "prettier.plugins":["@prettier/plugin-ruby","prettier-plugin-toml"]
such that the array values are strings that match the string format expected by npm install
- see this plugin list for the plugins I recommend being officially supported (but it could be designed in a generic way)
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
- Installing plugins via
npm install -g <name>
then have prettier auto-discover and use them. Rejected because user may not have need or want node/npm installed globally just to autoformat the language of their choosing.
Additional context
Add any other context or screenshots about the feature request here.
In an ideal world, this would be accompanied with logic to identify when the user is attempting to autoformat a document in a language supported by a plugin. If they didn't have the plugin the user would be prompted to download and add the plugin to their config rather than receiving this error