The following settings will be formatted when any file is saved.
I just need to format the HTML file when it is saved
{
"editor.formatOnSave": true,
}
CodePudding user response:
You can globally disable VSCode Format On Save altogether and enable it for only a handful of programming languages ( identifiers for languages ).
so for HTML, check below,
{
"editor.formatOnSave": false,
"[html]": {
"editor.formatOnSave": true
}
}
CodePudding user response:
You can do it like this :-
{
"editor.formatOnSave": false,
"[html]": {
"editor.formatOnSave": true
}
}