Skip to content
Discussion options

You must be logged in to vote

To answer my own question, using a text rope (i.e. the ropey crate) helps translating between the two.

I replaced the TextBuffer in my TextEdit widget implementation (I'm using a custom one) with ropey::Rope and it facilitates working with the byte positions provided by TreeSitter

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by the-drunk-coder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant