nvim-treesitter / nvim-treesitter-textobjects

Apache License 2.0
2.14k stars 191 forks source link

feat(ecma): add support for @return.inner, @return.outer and @statement.outer #683

Closed nikitarevenco closed 1 week ago

nikitarevenco commented 3 weeks ago

This includes js, ts, jsx, and tsx

Closes #686

kiyoon commented 3 weeks ago

Note that you shouldn't change the README manually because there is an automatic CI that does it

nikitarevenco commented 3 weeks ago

Note that you shouldn't change the README manually because there is an automatic CI that does it

I have reverted changes to the Md file

ribru17 commented 1 week ago

Would you mind running the query formatter? Then we can merge

nikitarevenco commented 1 week ago

Would you mind running the query formatter? Then we can merge

Ok!

ribru17 commented 1 week ago

Thank you! Also one last thing, I apologize for not mentioning earlier- would you mind putting this in an alteration? It would probably be easier to read. Something like:

[
  (for_statement)
  (while_statement)
  ...etc
] @statement.outer

the return statement can stay on its own

nikitarevenco commented 1 week ago

Thank you! Also one last thing, I apologize for not mentioning earlier- would you mind putting this in an alteration? It would probably be easier to read. Something like:

[
  (for_statement)
  (while_statement)
  ...etc
] @statement.outer

the return statement can stay on its own

Sure!, I agree this makes it more reasonable. I wasn't even aware of this syntax till now, that's cool!

ribru17 commented 1 week ago

Thanks!