nvim-treesitter-textobjects
nvim-treesitter-textobjects copied to clipboard
fix(elixir): separate function from parameter matching
Previous queries were mixing the parameter matches and the function matches into the same query. This would make it so that functions that didn't have parameters wouldn't match @function.inner or @function.outer queries.
Separating them makes it easier to focus on the specifics of fulfilling each query. This should resolve issue nvim-treesitter#249.
Sorry @kiyoon for the barage of PR's I was trying to break up my work into smaller pieces. I wasn't sure all who is involved in this project and how many eyes would see it.
When I test it, it seems to be not working with functions with parameters in #249 examples?
Thanks a lot for your work, and no worries, it makes it easier to focus on one problem at a time.
Thanks for the reminder on this PR @yihuikhuu. I'll take another stab at this incorporating your feedback this week.
I should have checked existing PRs before opening #605 😅
Mine seems to be a lot simpler, but maybe it's too generic? I've tested it a bit and it seems to match all call parameters in every situation (and it helps simplify other queries as well) without breaking other stuff, but maybe I'm missing something.