vscode-explicit-folding
vscode-explicit-folding copied to clipboard
Idea: A way to fold the *first* line, in similar to `"foldLastLine": true`.
Let's say I have this rule:
{
"begin": "{",
"end": "}",
}
If I apply it to:
void foo()
{
//
}
It folds to:
void foo()
{ …
I can show or hide }
using "foldLastLine"
, but there's currently no way to show/hide the {
. I.e. no way to fold that to:
void foo() …
I think it would be nice to have something like "foldFirstLine"
, which moves the start of the fold one line up.
I'd then create two rules: one that matches a line that has nothing but {
and whitespace ("foldFirstLine": true
), and the fallback one that matches {
elsewhere (false
).