ghostbuster91 / nvim-next

Apache License 2.0
29 stars 6 forks source link

Cannot repeat builtin `f`/`F`/`t`/`T` motions #14

Closed ghostbuster91 closed 2 months ago

ghostbuster91 commented 1 year ago

dfx followed by . doesn't work.

ghostbuster91 commented 1 year ago

Here is some info about dot-repeatable actions:

Hubro commented 9 months ago

Super gentle prod just to hear if you're planning on fixing this :sweat_smile:

I use movements like df", dt<Space> etc. quite a lot, so I keep running into this bug. If development of this plugin is frozen indefinitely then I'd rather uninstall it now and start getting used to not being able to repeat ]c... :cry:

ghostbuster91 commented 9 months ago

I personally stopped using f/t motions from this plugin because of this this. I was getting irritated with it not working as it should and I needed a quick workaround.

I don't know atm how to fix it. I would need to spend some time, take a look at some other plugins and see how they do this. I had other things on my plate recently and I did not have motivation for digging into this kind of stuff.

If development of this plugin is frozen indefinitely

No, it is not. I am using it (apart from this feature) and I cannot image working without it. At some point I will fix this issue though there is no ETA. Hopefully someone will beat me to it and submit a PR first.

I would be very happy to accept a PR with a fix ;)

ghostbuster91 commented 9 months ago

same issue in treesitter-textobjects https://github.com/nvim-treesitter/nvim-treesitter-textobjects/issues/519

ghostbuster91 commented 9 months ago

I went through couple of projects that seem to be doing something similar under the hood. The bad news is that it is tricky and requires some high vim-fu. The good news is that mini.jump was among them and it should be possible to implement that feature based on it.

Hubro commented 9 months ago

I personally stopped using f/t motions from this plugin

Do you mean you stopped using f/t motions altogether, or is there an easy workaround I'm not seeing?

Hubro commented 2 months ago

Awesome! :tada:

I rewrote all my stuff to use require("nvim-treesitter.textobjects.repeatable_move").make_repeatable_move_pair a while ago, but it feels really weird to use nvim-treesitter.textobjects to repeat git chunk moves, document diagnostic moves etc. I would definitely prefer to use a separate plugin for that.

Will try out nvim-next again next time I feel like refactoring a bit :smile: