nvim-treesitter / nvim-treesitter-textobjects

Apache License 2.0
2.2k stars 200 forks source link

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

Closed NikitaRevenco closed 2 months ago

NikitaRevenco commented 2 months ago

This includes js, ts, jsx, and tsx

Closes #686

kiyoon commented 2 months ago

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

NikitaRevenco commented 2 months 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 2 months ago

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

NikitaRevenco commented 2 months ago

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

Ok!

ribru17 commented 2 months 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 2 months 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 2 months ago

Thanks!