I have a Syntax Scheme that assigns "if" and "end" to the "statement" token class. I know this is working because colourisation applies the correct colours for "statement" in an EditView. However, I cannot get code folding to work. I have a SyntaxBlock with capture='true', but no matter what I set Start and End to, no code folding takes place. I have tried "[ kw:if ]", "[ id:if ]" and "[ statement:if ]" (and likewise for "end"). The SyntaxBlock is in my root scheme, and I don't inherit any other schemes. Code folding works if I define them as keywords, but not if they are not keywords.
Comments
https://files.lmd.de/downloads/tutorials/syntaxedit/synax_blocks_and_folding.htm