-
Notifications
You must be signed in to change notification settings - Fork 21
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
Integrate tree-sitter-cel for highlighting #14
Comments
I've look around a bit, and all I can find is the c highlighting library and the tree-sitter-web query interface. I believe, if you feed in the highlights query file, it should return a query that can capture the nodes with their label (which has all the source location info). Ideally this could then be mapped to a collection of source location + ace scope that ace understands, but the ace documentation doesn't show a way to bypass the regex based system they are using :-/. |
Hello @Alfus, it could be an alternative, but perhaps considering the effort needed, it would be better to create a syntax highlighter in ace, since we don't know for sure there's a way to bypass the regex based system. Thoughts? FWIW, there is an open issue related to tree-sitter support into the Ace code editor. Despite its presence, it appears that this issue has not received much attention or activity from the community. |
Reading that issue, it looks like it might actually be possible bypass the regex based highlighter and use tree-sitter; though, tree-sitter-web also uses wasm, to its a lot to pull in for just highlighting. I suspect this issue should wait for better tree-sitter support on both sides. |
Feature Description
Add tree-sitter based syntax highlighting
Additional Context
I created a tree-sitter grammar for cel: https://github.com/bufbuild/tree-sitter-cel with highlighting support. Would be cool to use it:
The text was updated successfully, but these errors were encountered: