nvim-treesitter-endwise
nvim-treesitter-endwise copied to clipboard
fix: support `Query:iter_matches` changes in upstream neovim
Copied from the body of the commit:
Neovim's
Query:iter_matchesfunction now returns a list of Nodes for each match in nightly. Previously theiter_matchesfunction only returned the last node. To get that previous behavior we just pull the last node out of the returned list of nodes.According to
:h news.txt,Query:iter_matchesadded a backwards compatibility option (all=false), but the intent is to remove it in a future release — thus it's better to rip the band-aid off now instead of fighting this again later on.See https://github.com/neovim/neovim/commit/6913c5e1d975a11262d08b3339d50b579e6b6bb8.
TL;DR:
Neovim upstream recently changed the return from Query:iter_matches and this adds a simple shim to support it for current nightly users. It should have the exact same behavior as what was previously used AFAIK.
@simonmandlik - Can this be merged?
This is not a question for me — I didn't write a single line of code of the core of the plugin, only provided julia support :)
Perhaps @RRethy ?