Home > Software design >  How vscade automatically formats when saving is only applicable to HTML files
How vscade automatically formats when saving is only applicable to HTML files

Time:03-28

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 ).

Referance from.

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
   }
}
  • Related