Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to jump to definition with denols #1440

Open
Ttayu opened this issue May 14, 2024 · 0 comments
Open

Unable to jump to definition with denols #1440

Ttayu opened this issue May 14, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Ttayu
Copy link
Contributor

Ttayu commented May 14, 2024

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

  1. Install denols.
  2. open deno file (e.g. deps.ts) .
  3. :Lspsaga goto_definition()
  4. :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

2012346

Terminal name/version

wezterm 20240203-110809-5046fc22

@Ttayu Ttayu added the bug Something isn't working label May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant