Format on Save

formatting
productivity
FOformatter

Description

Automatically format your code when you save a file. Works with various languages and respects your project's formatting settings.

json
{
  "rules": [
    {
      "name": "Format on Save",
      "pattern": ".*",
      "commands": [
        {
          "title": "Format Document",
          "command": "editor.action.formatDocument",
          "when": "editorTextFocus && !editorReadonly && editorHasDocumentFormattingProvider"
        }
      ]
    }
  ]
}