nvim-treesitter-textobjects
nvim-treesitter-textobjects copied to clipboard
Swap doesn't repeat with . operator
If I have a piece of code f(a, b, c, d)
and I put my cursor on a
and perform swap_next for @parameter.inner
, it does not compose with .
; after the initial swap I have f(b, a, c, d)
with the cursor still on a
, and I would expect that .
would once more do another swap (leaving f(b, c, a, d)
). Instead .
ignores the swap does whatever happened before that (eg an insertion).
Thanks for this plugin, by the way; enabling this kind of thing is to me one of the most exciting outcomes of treesitter.
I have to look into how this can be done... Absolutely agree that this has to be fixed.
Recommend Sideways plugin, I use this to do that, and it support .
operator.
Not base on language, but it's good too.
https://github.com/AndrewRadev/sideways.vim
Well, I can do the same what sideways does: https://github.com/nvim-treesitter/nvim-treesitter-textobjects/pull/52
Closing as completed with #343