Great work!
Hi there. I stumbled across this yesterday while searching to see if there was tree-sitter support for openscad (hoping for some structural editing support in emacs). I've previously been using the openscad LSP from the PR, so was keen to try yours out. I found it was very easy to get going, fast, and doesn't negatively interact with my normal openscad workflow. The main features I'm missing are support for:
- jumping to definition (textDocument/definition)
- find references (textDocument/references)
- detection of undefined variables/modules (the LSP PR does this, I'm not sure how easy it is to add to your server).
As a side note, I also noticed that your (upstream) grammar wants a trailing semicolon on use/include lines such as:
use <Lenbok_Utils/utils.scad>
whereas openscad itself does not care.
@dzhu The semicolon issue has been fixed upstream in tree-sitter-openscad. Have you made any progress toward supporting additional definition/reference features?
I have moved to using https://github.com/Leathong/openscad-LSP as it implements most of the above and more.