add tree-sitter integration #8
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority/Critical
Priority/High
Priority/Low
Priority/Medium
Priority/Undefined
Reviewed/Confirmed
Reviewed/Duplicate
Reviewed/Invalid
Reviewed/Won't Fix
Status/Abandoned
Status/Blocked
Status/Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
NTBBloodbath/koa!8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refs/pull/8/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Missing code: Janet runtime files modification to use the tree-sitter bridge and parse the buffer when loading the files in the
buffer.janetruntime file.NB: syntax highlighting will be tricky, and it will require TS queries support in the bridge. I'm not bothered to deal with it right now as we need more work before getting syntax highlighting to work anyway such as proper colorschemes and such. Might be addressed in the future.
Right now the only things that are missing are:
1. It can be done easily I think, we can pass an old parsing tree to the
Parser.parseBufferfunction (old_tree: ?*const Tree).2. Currently, I've made it so that embedded tree-sitter parsers install their queries into the
./zig-out/queries/prefix or whatever the installation directory is when runningzig build. However, that is not optimal for release builds yet. Ideally we should embed the whole bundle somehow, maybe using zig-embeddir to alleviate the pain. This will be addressed in another Pull Request as I want to tackle down other concerns at the moment.3. This is more tricky and requires way more changes and effort, so it is out of the scope of the pull request to fully implement that feature. It requires a colorschemes system (even an unga bunga one would work), tree-sitter interop with vaxis through the Janet runtime and so on.