Yuescript icon indicating copy to clipboard operation
Yuescript copied to clipboard

no tree-sitter grammar

Open henlo-birb opened this issue 3 years ago • 3 comments

currently there is no tree-sitter grammar, preventing yuescript support in helix, my editor of choice, as well as any other editor/environment/whatever that uses tree-sitter. please add one if possible

henlo-birb avatar Sep 13 '22 20:09 henlo-birb

Just took a look for tree-sitter and went over the tutorial, didn't find a tree-sitter grammar, instead found a tree-sitter DSL written in Javascript to generate a C implemented parser. That would take some work to implemented the whole tree-sitter parser and make the generated parser codes work in helix editor. Maybe you can help a little with this load of work.

pigpigyyy avatar Sep 23 '22 09:09 pigpigyyy

And to implement Yuescript syntax, the tree-sitter DSL itself is not sufficient. We need to learn from the tree-sitter Python project for implementing the indent and dedent functions using tree-sitter C API.

pigpigyyy avatar Sep 23 '22 09:09 pigpigyyy

I looked at the tree-sitter docs and started trying to make a parser before I submitted the issue and I found the documentation pretty confusing tbh, way out of my comfort zone. I ended up switching to lunarvim anyway so it's no longer a problem for me.

henlo-birb avatar Sep 23 '22 11:09 henlo-birb