-
Notifications
You must be signed in to change notification settings - Fork 41
Can not scroll with lspsaga smart scroll #118
Comments
hmmm can you share how you've bind it. require'lspsaga.action'.smart_scroll_with_saga(1, '<c-d>')
require'lspsaga.action'.smart_scroll_with_saga(-1, '<c-u>') works for me |
@tami5 sorry my lspconfig was a bit long, the binding is included in the issue description, but I will put it here: local opts = { silent = true, buffer = bufnr }
vim.keymap.set('n', '<c-f>', "<cmd>lua require('lspsaga.action').smart_scroll_with_saga(1, '<c-f>')<cr>", opts)
vim.keymap.set('n', '<c-b>', "<cmd>lua require('lspsaga.action').smart_scroll_with_saga(-1, '<c-b>')<cr>", opts) |
this is what I have when running n <C-F> *@<Cmd>lua require('lspsaga.action').smart_scroll_with_saga(1, '<C-F>')<CR>
Last set from Lua |
hmmm thats odd, the issue is here if current_win_lnum >= last_lnum then
current_win_lnum = last_lnum - 1
end so this function scroll_in_win is called by multiple provider, does this happen when you want to scroll hover?, some how last_num isn't set by the caller, which can be a bug |
Hi @tami5 , thanks for taking a look. the smart scroll does not work in all lspsaga windows (hover, preview definition...) (nothing happens), but only the scroll in lsp finder generate the error |
Oh, I see, I was wondering why I didn't experience this error. unfortunately this is the one thing I kept but haven't been using, there are many open issues regarding lsp finder and I recommend replacing with something like telescope lsp_* . feel free to continue debugging if you found a solution please open a pr. |
@tami5 but the normal smart scroll command do not work on other lspsaga windows too. (hover, preview definition) 😭 |
hmmm
Maybe the way the command is set? n <C-D> * <Cmd>lua require'lspsaga.action'.smart_scroll_with_saga(1, '<C-D>')<CR>
Last set from Lua mine doesn't have |
it's because i set them in with buffer option. I also set them without buffer option but it doesn't work. Is there a way to jump to the lspsaga window? I can scroll from there. I tried with |
I'm also setting it using buffer, try using old vim api for hovers you can double hover to jump to it, others not sure. |
hi @tami5 , can we make it work the same for other windows? like jumping to the window that we need to scroll when we hit the keymap again when that window is opened? I tried with old vim api but it also didn't work |
Description
Hi, I got this error when trying to execute keymap for lspsaga smart scroll
Expected Behavior
It should scroll the window up/down
Actual Behavior
It showed the error above
Neovim Built in Behavior
Neovim doesn't have this built in AFAIK
Details
Reproduce
lspconfig.lua
lspsaga.lua
Environment
Linux NixOS 22.05
The text was updated successfully, but these errors were encountered: