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
Directly use tree sitter C API #10286
Labels
A-dependencies
Area: Dependency
A-tree-sitter
Area: Tree-sitter
C-enhancement
Category: Improvements
E-medium
Call for participation: Experience needed to fix: Medium / intermediate
Comments
pascalkuthe
added
A-dependencies
Area: Dependency
E-medium
Call for participation: Experience needed to fix: Medium / intermediate
A-tree-sitter
Area: Tree-sitter
labels
Apr 8, 2024
That what I meant with
We want to publish the highlighter on crates.io which would cover that. I don't think zed would want to use that (the guy that maintains tree sitter works on zed) but Laplace already uses a vendored copy of our highlighter (which is pretty old and is missing lots of bug fixes and performance improvements I amde since) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-dependencies
Area: Dependency
A-tree-sitter
Area: Tree-sitter
C-enhancement
Category: Improvements
E-medium
Call for participation: Experience needed to fix: Medium / intermediate
I am not convinced the tree sitter rust crate is worth using . The api is really subotimal. The C API is stable and the rust api is fairly easy to replace since its just bindings.
Things to improve (add more as we find more)
Use
regex-cursor
for queries instead of buffering (we allocate for every query, I found out)cursor
trait instead of their text provider api (which is only used for regex captures) it would be possible to fix crashed like Helix crashes when editing files with Russian text #7273 which are caused by captures within unicode chars. Regex-cursor fully supports invalid utf8 and won't callrope.slice
but manage the iteration itself. I could remiplement this osmewhat with the current api but it would be reimplementing some nont quite tirival logic. I don't want to do that for code I don't expect to keepfix undefined behaviour in the query api
remvoe code we don't neeed to speedup builds
we can bundle this crate together with our highlighter so other people don't need to vendor our code. I want to seperate our TS code from config and other code into a seperate crate anyway. They really shouldn't be coupled
The text was updated successfully, but these errors were encountered: