nvimdev / lspsaga.nvim

improve neovim lsp experience
MIT License
3.47k stars 288 forks source link

Random error from :LspSaga hover_doc #1473

Open mikehaertl opened 3 months ago

mikehaertl commented 3 months ago

Describe the bug

I randomly get this error from LspSaga:

image

For context, my ShowHelp() just calls :LspSaga hover_doc:

" Show documentation for word under cursor using builtin :help for vim and
" help files and LSP for everything else
function! ShowHelp()
    if index(['vim','help'], &filetype) >= 0
        execute 'vert bo h '.expand('<cword>')
    else
        execute 'Lspsaga hover_doc'
    endif
endfunction

Steps to reproduce

I have no clear recipe to reproduce the issue.

Expected behavior

No error.

Neovim version (nvim -v)

0.10.0

lspsaga commit

6f920cf

Terminal name/version

Gnome Terminal 3.44.0

DrunkenToast commented 2 weeks ago

I often get this error as well with ts_ls.

Error executing Lua callback: ...ellar/neovim/0.10.2_1/share/nvim/runtime/lua/vim/lsp.lua:900: attempt to index local 'client' (a nil value)
stack traceback:
        ...ellar/neovim/0.10.2_1/share/nvim/runtime/lua/vim/lsp.lua:900: in function 'cancel'
        ...local/share/nvim/lazy/lspsaga.nvim/lua/lspsaga/hover.lua:11: in function 'clean'
        ...local/share/nvim/lazy/lspsaga.nvim/lua/lspsaga/hover.lua:344: in function 'render_hover_doc'
        ...cal/share/nvim/lazy/lspsaga.nvim/lua/lspsaga/command.lua:26: in function <...cal/share/nvim/lazy/lspsaga.nvim/lua/lspsaga/command.lua:25>
        ...cal/share/nvim/lazy/lspsaga.nvim/lua/lspsaga/command.lua:80: in function 'load_command'
        ...r/.local/share/nvim/lazy/lspsaga.nvim/plugin/lspsaga.lua:8: in function <...r/.local/share/nvim/lazy/lspsaga.nvim/plugin/lspsaga.lua:7>
Press ENTER or type command to continue