Closed milahu closed 1 year ago
@milahu I agree that regex is limiting when try to fold a language but the primary objective of the extension is to support user-specified folding (like {{{ ... }}}
).
But to support folding based on a syntax tree is an all new kind of extension.
yeah ... im moving from vscode to lapce editor, in the hope that they will base all plugins on parsers, not regex (and multiple plugins share one parser, to avoid double-parsing)
there are tree-sitter plugins for vscode, but i prefer a fast editor (rust vs javascript)
closing as "out of scope"
lapce is still new. It still doesn't support folding since it uses the highlights from helix. How do you define foldings in tree-sitter? I'm interested because I find that the foldings definitions the VSCode's language grammar is very limited.
How do you define foldings in tree-sitter?
based on the syntax tree...?
its just faster and more precise than regex, otherwise it should be similar. sorry, i can only guess for now
let me use more powerful tools to select nodes
regex is too limited for this task
example:
result with folding:
the last
</div>
cannot be matched with regexsettings