vscode自动保存设置为afterDelay后prettier不生效

发布时间 2023-12-04 19:26:55作者: rachelch

"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?