Unable to jump to definition with denols
Ttayu opened this issue · comments
Describe the bug
I am unable to jump to definition using :Lspsaga goto_definition()
with the denols language server, although :lua vim.lsp.buf.definition()
works fine for jumping to function definitions with lspconfig.
This seems to be because the targetUri
returned by denols
is special, and the standard textDocument/definition
is unable to handle it for jumping.
In lspconfig, a special function is implemented specifically for denols to handle this case, as shown in this line
However, lspsaga
does not have this special handling (Line) , which is likely why jumping to definition does not work with denols.
I would appreciate if this could be looked into and support for the denols targetUri format could be added to lspsaga for seamless definition jumping.
Steps to reproduce
- Install denols.
- open deno file (e.g. deps.ts) .
:Lspsaga goto_definition()
:lua vim.lsp.buf_definition()
Expected behavior
it should be able to jump to the definition as well as :lua vim.lsp.buf.definition()
.
It should also be possible to jump to another method such as peek_definition
in the same way.
Neovim version (nvim -v)
v0.10.0-dev-2698+g00e71d3da
lspsaga commit
Terminal name/version
wezterm 20240203-110809-5046fc22