Closed thomastthai closed 1 year ago
if the closing bracket is displayed on the next line
, it most likely that the folding region is from the default folding provider and not from this extension.
What are your settings?
In any case, even if correctly configured, you will only see function {...
and not function {...}
.
"editor.defaultFoldingRangeProvider": "zokugun.explicit-folding",
"explicitFolding.rules": {
"*": [
{
"begin": "{",
"end": "}",
"foldLastLine": true
},
{
"begin": "[",
"end": "]",
"foldLastLine": true
},
{
"begin": "(",
"end": ")",
"foldLastLine": true
}
]
},
What changes is needed to get the function {...}
to display?
I can't reproduce your issue. From my tests, when the "foldLastLine": true
are removed, the folding regions are folded on a single line.
By default, foldLastLine
is true
. So it's weird!
Do you have an example?
To have function {...}
, you will to changes VSCode... since this extension only provides a list folding regions.
I checked again and commented out all the //"foldLastLine": true
and it does fold to one line. That was the behavior with VSCode with various extensions installed prior to installing vscode-explicit-folding
. After installing and setting the recommended configs were in place the closing bracket started appearing on the next line. That was when //"foldLastLine": true
was set. If the case comes up again, I'll look into it further and post.
It's unfortunate VSCode doesn't have the option to place the closing bracket on the same line after the ellipse.
Keep up the excellent work with vscode-explicit-folding
extension.
When brackets are folded, the closing bracket is displayed on the next line unless
foldLastLine: true
is set -- in which case that last closing bracket is not shown. That seems to work as intended. However, providing an option to display the folded region on one line with the closing bracket or parenthesis like:array [...]
could be more visibly succinct and intuitive.
Additional reference