在这里报告了同样的问题https://github.com/microsoft/vscode/issues/47240,我从那个页面得到了修复方法。
这里是解决问题的具体评论https://github.com/microsoft/vscode/issues/47240#issuecomment-379490218
使用 "editor.foldingStrategy": "auto"时,闭合块括号和同一行后面的内容被吞掉。与 "editor.foldingStrategy": "indentation" 不同。它可能会非常误导,例如if else语句中:
对比 "editor.foldingStrategy": "indentation"