ggandor / leap-spooky.nvim

👻 Actions at a distance
The Unlicense
277 stars 7 forks source link

[Feature Request] Operator to search all windows, both cross and current #13

Closed colin-heffernan closed 1 year ago

colin-heffernan commented 1 year ago

I was expecting the R and M keys to include the currently selected window as well as the other windows, but I have found this to not be the case. Is there any way to make capital keys search all windows?

ggandor commented 1 year ago

DIY solution: replace that line https://github.com/ggandor/leap-spooky.nvim/blob/73c8fe21776275b54e875a89aae240d60b8b6af1/lua/leap-spooky.lua#L133-L135 with

elseif mapping.scope == 'cross_window' then
  local focusable_windows_on_tabpage = vim.tbl_filter(
    function (win) return vim.api.nvim_win_get_config(win).focusable end,
    vim.api.nvim_tabpage_list_wins(0)
  )
  target_windows = focusable_windows_on_tabpage
end

so that R/M will search in all windows. Hope this helps!

colin-heffernan commented 1 year ago

Thanks for the response! May test this, but I have largely switched to Helix. Hopefully Leap makes its way there!