Closed diocletiann closed 1 year ago
Can you try:
"go": {
"explicitFolding.rules": {
"begin": "if err != nil",
"whileRegex": "^\\s*(?:return\\serr|\\})",
"autoFold": true,
}
}
Thanks, I had the wrong escape syntax.
Your code works well and it also gave me a few other ideas. Is there a way to re-process the folding on demand? I would be nice to get back to baseline with a keybind.
Thanks for a great extension!
The foldings are reprocessed when you have updated the file or have changed the config.
I would like to start with folding exactly this entire block:
If I use
"end": "}"
it catches other blocks but if I don't I can't get it to fold that last line. I guessend
overruleswhile
but I'm not sure how to havewhile
look for more than one pattern. Thanks.Config: