Open riley-x opened 1 year ago
You could use nested but that will depend on your usage. Can you provide an example (code & rules)?
Silly example:
function t1() { // {{{
}
function t2() {
} // }}}
with rules
{
"begin": "{",
"end": "}",
},
{
"begin": "{{{",
"end": "}}}",
},
VS code folds function t1
on the first line instead of the entire {{{}}}
block.
I know here you could just move the location of the comments, but in my use case it doesn't always apply/is ideal.
Try
{
"begin": "{{{",
"end": "}}}",
"nested": [
{
"begin": "{",
"end": "}",
},
// your other rules
]
},
This folds the function t1
line above correctly now, but now function t2
is not foldable.
Actually I think just by exchanging the rule order in my above example does what I want:
{
"begin": "{{{",
"end": "}}}",
},
{
"begin": "{",
"end": "}",
},
Is this expected behavior?
Is there a way to define which fold takes precedence when there are multiple matches in one line? For example, looking at the debug output I see
When I click the fold icon in VS code, it only folds between lines [272, 276]. Instead I would like for it to prioritize the second fold, between [272, 289].