nvim-treesitter-textobjects
nvim-treesitter-textobjects copied to clipboard
Request: Add another query for elements?
Is your feature request related to a problem? Please describe. I want to have swap functionality within more than just parameter lists. I want it on array elements and object constructor listings in all languages.
Describe the solution you'd like
I've already worked out how to set the treesitter queries for this for javascript. See below the highlights correspond to the query I just wrote for @element
there on the top left:
I'm just not sure what the procedure is to introduce another semantic query to textobjects. I originally wanted to just extend @parameter.inner
to also match these, but I figured that would probably not be the right way to go about it.