"files.autoSave": "afterDelay"
"editor.formatOnSave": true
这两个配置不能一起使用
解决方法:
1.将"afterDelay"修改为“onFocusChange"
2.设置成onFocusChange或者onWindowChange
3.关闭重启vscode
参考文件:files.autoSave and editor.formatOnSave
How to format current file automatically without saving manually?