Repository navigation
[Draft] - Tree Sitter Service (POC) - #147648
Jason Williams (jasonwilliams) wants to merge 2 commits into
Conversation
|
Any updates on this PR? |
|
Hey Alexandru Dima (@alexdima) do you have any advice? |
|
Jason Williams (@jasonwilliams) We have had an exploration done by Aiday Marlen Kyzy (@aiday-mar) for using Tree Sitter as a syntax highlighting engine. For the purpose of the exploration we have been mostly interested in finding out what would be the potential speed / memory savings that Tree Sitter could bring. Please see #161479 for the exploration outcome. To productize this and allow extensions to contribute |
|
In that case I will close this in favour of #161479 Alexandru Dima (@alexdima) i don't know too much about the ABI versioning, but are there breaking changes happening a lot? |
This PR creates a new contributionPoint called
tsGrammarswhich can be used to load a new tree sitter grammar, similar to AnyCode contribution points.There is a new service which picks up the grammar for whichever active language and then loads it into the parser, that tokenization instance can then handle tokenizing source code.
Some issues:
Native node tree sitter doesn't seem to work with electron due to this issue: tree-sitter/node-tree-sitter#90
So I've got as far as setting up a new service which instantiates and attempts to load
web-tree-sitter, however it's unable to load due to a security policy:I don't know the codebase well enough to properly configure this and put web-tree-sitter in the right place.
This PR fixes #50140
This PR fixes #216