-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
Repo example code returns nil for highlight method #38
Comments
Thank you for reporting this. Probably a bug - investigating now. |
Ok so this is a bug. Even though synchronous access with the So far, this is a valid situation. You've asked for synchronous access, and that access is impossible. But, it should not be in this situation. I think this is because the |
Thank you for looking into it! I can confirm that it does work if I use the asynchronous methods. Does this mean I should hold off of using the synchronous methods for now? Or is there a case where they work as expected? |
With the code currently on main, any synchronous work that requires parsing will fail. I'm working on a fix, but I also want to make a test and getting that working has been a chain reaction of problems... |
Ok, I think this is fixed now. It took a long time because I added a test, but that test didn't work because a whole bunch of stuff went wrong with accessing Swift tree-sitter highlights. alex-pinkus/tree-sitter-swift#289 |
Yep, all working now. Thank you for the quick fix! |
I'm trying to use the example code provided in the repo. For some reason that is not clear to me, the following line will return nil (and in the example case, crash because it's force unwrapped)
I had a look at the code but couldn't find an immediate cause for it. I'm using the main branch to test this, as it's the one used in the example code.
I also tried using the sample project. There, the TextViewHighlighter example seems to work as expected. The other method provided (setUpTreeSitter) has the same issue though.
Am I doing anything wrong here? Or should I stick with 0.6.0 for now?
The text was updated successfully, but these errors were encountered: