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

Implement LHS/RHS of assignment operator

Open romgrk opened this issue 5 years ago • 1 comments

Like this but with treesitter support.

romgrk avatar Oct 19 '20 23:10 romgrk

I guess this either requires: https://github.com/nvim-treesitter/nvim-treesitter/pull/493 or we just have a assignment textobject whose "inner" is either rhs or lhs.

For python:

(assignment
 left: (_) @lhs.inner
 right: (_) @rhs.inner)

or

(assignment
 left: (_) @assignment.inner
 right: (_) @assignment.inner) @assignment.outer

theHamsta avatar Oct 23 '20 10:10 theHamsta

Closing as completed in #386

kiyoon avatar Feb 14 '23 18:02 kiyoon