Is it possible to set different default formatters for different languages in VSCode? I want VSCode to autodetect the language used in current file and use the appropriate editor. How can I achieve this?
Is it possible to set different default formatters for different languages in VSCode? I want VSCode to autodetect the language used in current file and use the appropriate editor. How can I achieve this?
You can edit your settings.json file and type these depending on which language you want to use. In my case I have a formatter for HTML and a separate one for Javascript:
{
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "remimarsal.prettier-now"
}
}