nvim-lspconfig
nvim-lspconfig copied to clipboard
denols: current status (meta issue)
This issue is meant to keep track of the current status of denols, this should help us to focus on whats missing to bring denols on par with vscode-deno.
bugs:
- [x] jumping to definition then returning breaks lsp https://github.com/neovim/nvim-lspconfig/issues/1998
- [ ] relative dependencies inside virtual text document is not resolved correctly https://github.com/neovim/neovim/pull/19773
- [x] codelens fails to call denolscache https://github.com/neovim/nvim-lspconfig/pull/2016
- [x]
DenolsCache
works but it throws an errormethod not found
https://github.com/neovim/nvim-lspconfig/pull/2009 - [ ] the lsp log always shows this line
[ERROR][2022-07-15 07:12:55] .../vim/lsp/rpc.lua:420 "rpc" "deno" "stderr" "Error converting specifier settings (file:///home/mrcool/dev/deno/lab/deno:/https/deno.land/x/simple_shell/mod.ts): Error converting specifier settings: invalid type: null, expected struct SpecifierSettings\n"
missing features:
commands: https://deno.land/manual/language_server/overview#commands
- [ ] deno.test
requests: https://deno.land/manual/language_server/overview#requests
- [ ] deno/performance
- [ ] deno/reloadImportRegistries
- [ ] deno/task https://deno.land/manual/tools/task_runner https://github.com/neovim/nvim-lspconfig/pull/2014
notification:: https://deno.land/manual/language_server/overview#notifications
- [ ] deno/registryState https://github.com/neovim/nvim-lspconfig/pull/2027
Regarding
relative dependencies inside virtual text document is not resolved correctly
The problem is in virtual text nvim automatically adds the current file-path to deno schema so
deno:/https/deno.land/x/simple_shell%400.13.0/mod.ts
becomes /home/user/dev/deno:/https/deno.land/x/simple_shell%400.13.0/mod.ts
Currently there is only one bug remaining https://github.com/neovim/neovim/pull/19967 with that fixed the experience is equivalent to vscode-deno
The missing features can be implemented in a separate plugins once this bug is fixed.
I wrote a plugin for this https://github.com/sigmaSd/deno-nvim
@sigmaSd nice! Feel free to reference that from the docs here.
done thanks!
I think I can close this issue now, the remaining bug have issues upstream already.
FWIW, https://github.com/neovim/nvim-lspconfig/issues/1937 is still open because I think it makes sense to have very thin (1-2 lines per command) or auto-generated commands if there's a way for the client to "discover" LSP server capabilities and generate commands for (custom) server actions. But for non-trivial commands and features, separate plugins are appropriate.
I see thanks for the heads up.
if there's a way for the client to "discover" LSP server capabilities and generate commands for (custom) server actions.
Short answer: it's not possible Long answer: although it's possible to discover what kind of commands the server supports (They're listed as part of the server_capabilities), the arguments the commands require are not described. That makes sensible auto generation of client commands pretty much impossible
Thanks @mfussenegger . That leaves the "very thin" option. But that's probably not possible to do in a generic way.
Hello, I have a problem when importing dependencies from esm.sh, Deno Intelissense in NeoVim do not work for esm.sh imported packages. It works for deno.land & npm: packages, but not for esm.sh. I still can run my program with Deno, but the types are not loaded by denols, even so there are present in the cache folder.
Can you provide typescript example that reproduce the issue
Ok, the problem was coming from the fact that I did not run the deno cache
before running my program.
Actually, the deno cache
command downloaded all the types from esm.sh 😄