hop.nvim
hop.nvim copied to clipboard
Feature request: don't overlap hints between windows when using `multi_windows`
If we look at the following screenshot, we see that there are hints shared between the two windows, which are views into the same buffer:
As a result, when I type sc
, I don't know which spot my cursor will end up in. That's pretty disorienting.
Is it possible to make the hints not shared? I assume that the hints are probably associated with the buffer rather than the window because of Neovim internals, but if that is the case perhaps we can open a Neovim issue to see how the core team there thinks this kind of use case should be handled.
It’s either a simple option when creating extmarks (i.e. you set the marks in a buffer, not in a window, but maybe there’s a way to also provide a window to scope it there?), or Neovim lacks the feature and there’s no way currently.
Like many, I was an easymotion user before. I understand we dont want to do it the easymotion way now, since changing the contents of the buffer doesnt feel right. Did you look at nvim_set_decoration_provider
?
... nvim_buf_set_extmark can be called to add marks on a per-window or per-lines basis. ...
Sounds like it might work. I think those marks you set in this callbacks are ephemeral. Is that what you are already doing in the current code?
I'm sure people have different philosophies, but for me being able to move anywhere without having to think about scope (line, buffer, window, ...) is the shortest and easiest way, so multi_windows = true
works best for me but is currently irritating every once in a while.