I have VS Code configured for formatting on saving and also configured for auto-saving after delay using the following settings:
{
...
"editor.formatOnSave": true,
"files.autoSave": "afterDelay",
"files.autoSaveDelay": 1000,
...
}
But, it does not format when auto-saving, only if I explicitly save, such as using CTRL+s.
How can I get it to format automatically?
I don't believe this is currently possible, see this thread for further discussion.
As pointed out in the comments, this is now possible with the use of extensions. There are two extensions suggested in the thread I originally linked:
Both require adding a bit of configuration to your settings.json, check out the thread for info on how to do that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With