Add support for regions
Issue #12
on hold
Possibility to fold and unfold regions would be a plus!
Comments (4)
-
repo owner -
repo owner - changed status to open
-
repo owner - changed status to on hold
Update: VSCode now supports indentation based code folding. There is currently no way to define language related code folding. See this issue for more information:
-
I want to add, that (at least of the time I’m writing this) indentation based and tag based region folding don’t interfere at all. Fixing this issue is as simple as adding
"configuration": "./language-configuration.json"
to the
objectpascal
language object atcontributes.languages
inpackage.json
with alanguage-configuration.json
file like this:{ "comments": { "blockComment": [ "{", "}" ], "lineComment": "//" }, "folding": { "markers": { "start": "^\\s*{\\$[Rr][Ee][Gg][Ii][Oo][Nn]\\b.*", "end": "^\\s*{\\$[Ee][Nn][Dd][Rr][Ee][Gg][Ii][Oo][Nn]\\b.*" } } }
This would add support for the
{$REGION}
and{$ENDREGION}
directives to be automatically recognized as region specifiers in VSCode. - Log in to comment
Visual Studio Code has currently no support for code folding. But this will change very soon. OmniPascal will support this new feature approximately four weeks later - May be even earlier but I don't like to promise anything now.