nvim-treesitter-textobjects icon indicating copy to clipboard operation
nvim-treesitter-textobjects copied to clipboard

Request: Add another query for elements?

Open unphased opened this issue 1 year ago • 9 comments

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:

image

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.

unphased avatar Apr 13 '23 02:04 unphased