vscode code folding not showing closing brace

1.5k views Asked by At

How do I make vscode editor show the closing braces of a folded code snippet enter image description here

The image above represents what I have in my editor. However, I want to be able to see the closing braces. Thanks in advance

2

There are 2 answers

0
Ronald M. Kasendwa On

The same issue was reported here https://github.com/microsoft/vscode/issues/47240, I got a fix from that page

Here is the specific comment that resolves the issue https://github.com/microsoft/vscode/issues/47240#issuecomment-379490218

Eyep, when using "editor.foldingStrategy": "auto" the block-closing bracket and everything after on the same line gets eaten up. Unlike it is with "editor.foldingStrategy": "indentation". It can be extremely misleading, like for example in if else case:

enter image description here

VS. "editor.foldingStrategy": "indentation"

enter image description here

0
M Komaei On

use this setting : "editor.foldingStrategy": "indentation" enter image description here