prettier-vscode
prettier-vscode copied to clipboard
Issue with editor.defaultFormatter setting precedence
Is your feature request related to a problem? Please describe.
When I have in my user settings.json:
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
And then in a workspace settings.json that is using prettier for everything:
"editor.defaultFormatter": "esbenp.prettier-vscode",
The user level language specific setting for the default formatter will take precedence, this means that if I want to make sure prettier is used for everything in a project that uses it, and especially when I have a committed .vscode/settings.json, I will need to add an language specific setting for editor.defaultFormatter for every language used in the project.
See VS Code Settings Precedence
Describe the solution you'd like A better way to control the default formatter making sure the project's own preference take effect rather than any random user setting. This might be something that needs to be forwarded over to VS Code itself.
Otherwise I believe this needs to be documented in this extension's README.md so as to possibly avoid tripping other users over this issue.
Describe alternatives you've considered Deal with it. 😎 Remember to manually add such language specific default formatter setting to each project that needs it...
This isnt anything extension authors have control over. This is an issue/feature request for VS Code itself.