-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
fix(treesitter): revert to using iter_captures in highlighter #27901
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did consider doing this originally, but there was a concern that exposing the match table in iter_captures
might surface other bugs. See #27274 (cc @wookayin). At this point it seems like we might just have to pick our poison though.
I had a branch where I was working on an independent fix for the issues that #27274 resolved, so perhaps I can revive that if @wookayin doesn't want to pick it back up.
My god this is such a minefield! It seems the most glaring problem in that PR is with the metadata table. The metadata table is match level, so regardless of where we go, I would say that it should always be provided with the match table. |
Yeah, this is design debt inherited from the earliest implementation (and possibly even upstream). The |
That was quick. (Lint was failing, btw.) |
Dam, pulled the trigger a bit quick. Will fixup at some point. |
I just checked this one and #27895; so this PR does revert the use of UPDATE: It looks like an "ordering" issue between multiple highlights across different capture/matches, as explained in #27895. |
Yes, as far as I understand it |
…neovim#27131)" This reverts commit 15e77a5. Subpriorities were added in neovim#27131 as a mechanism for enforcing query order when using iter_matches in the Tree-sitter highlighter. However, iter_matches proved to have too many complications to use in the highlighter so we eventually reverted back to using iter_captures (neovim#27901). Thus, subpriorities are no longer needed and can be removed.
#27131)" (#28585) This reverts commit 15e77a5. Subpriorities were added in #27131 as a mechanism for enforcing query order when using iter_matches in the Tree-sitter highlighter. However, iter_matches proved to have too many complications to use in the highlighter so we eventually reverted back to using iter_captures (#27901). Thus, subpriorities are no longer needed and can be removed.
neovim#27131)" (neovim#28585) This reverts commit 15e77a5. Subpriorities were added in neovim#27131 as a mechanism for enforcing query order when using iter_matches in the Tree-sitter highlighter. However, iter_matches proved to have too many complications to use in the highlighter so we eventually reverted back to using iter_captures (neovim#27901). Thus, subpriorities are no longer needed and can be removed.
neovim#27131)" (neovim#28585) This reverts commit 15e77a5. Subpriorities were added in neovim#27131 as a mechanism for enforcing query order when using iter_matches in the Tree-sitter highlighter. However, iter_matches proved to have too many complications to use in the highlighter so we eventually reverted back to using iter_captures (neovim#27901). Thus, subpriorities are no longer needed and can be removed.
Fixes #27895