Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tree-sitter parser #142

Open
pokey opened this issue Oct 16, 2023 · 2 comments
Open

tree-sitter parser #142

pokey opened this issue Oct 16, 2023 · 2 comments

Comments

@pokey
Copy link

pokey commented Oct 16, 2023

I finally saw your HN comment only ~1 year later 😅. While it would be possible to use Cursorless as a voice interface to edit Glicol code out of the box, if you want the ability to use rich scopes to manipulate the parse tree, the first step would be to write a tree-sitter parser. There are other benefits to writing a tree-sitter parser, as they're increasingly used to add rich language support to various editors (eg Helix, neovim, etc)

@chaosprint
Copy link
Owner

Interesting. I am working on a collaborative editor using wgpu so I have control over rendering everything on the screen. This would be a good place to experiment with it.
I am also rewriting everything in pure Rust, without Pest and Petgraph, so I will try the tree there as well.

@itsjunetime
Copy link
Contributor

I tried to implement this over the last week or so, you can find it here: https://github.com/itsjunetime/tree-sitter-glicol

It's definitely not perfect (it has small errors on basically every file I try to pass in to it, but it gets most of the structure right), and it could be more granular (I was mostly only trying to implement it to get syntax highlighting with nvim-treesitter), but if others can submit PRs to make it work better, that would be much appreciated :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants