-
-
Notifications
You must be signed in to change notification settings - Fork 18
Feature Request: Support Deno LSP #2
Comments
Interesting. I've never used Deno, but it looks like the language server supports the features required to handle the plugin's current functions. I'll look into it (I've wanted an excuse to give Deno a shot, anyways) and see if it's possible. |
@jose-elias-alvarez Did you get a chance to have a look at Deno? It would be amazing if this plugin was compatible. There have been a lot of updates in the last two months to the LSP. |
I haven't, though I am still (personally) very interested in it. Is there a good source for Deno LSP documentation re: features and implementation? I was able to find this issue, but I'm not sure if it's definitive, and I don't know Rust, so parsing the code isn't easy for me. |
The rust module has documentation about the implementation: https://github.com/denoland/deno/tree/main/cli/lsp#custom-requests . Some of these custom requests are available in Neovim: https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md#denols
Afraid I know nothing about LSP's really and can't be of much help :( I think your best bet might be look at the official VS Code plugin https://github.com/denoland/vscode_deno which is written in TypeScript. Also, I am certain that more knowledgeable people would love to answer any of your questions on the discord channel https://discord.com/invite/deno or the Github discussion channel https://github.com/denoland/deno/discussions There is general editor LSP integration stuff at https://deno.land/manual/getting_started/setup_your_environment#editors-and-ides , not much use, but you could look at how other IDE's are doing it other than the official plugin. |
Awesome, thanks for the info. A good chunk of the complexity in this plugin is getting offloaded to another plugin, so I think there might be room to include Deno support if it's a possibility. I'll investigate and let you know. |
So I've started playing around with Deno myself a bit, but as I mentioned in #87, in the future I'd like to turn this plugin into a "full-featured" language server plugin that takes care of setting up With that in mind, I think Deno support would be out-of-scope for this plugin, so I'm going to close this issue. As I understand it, the Deno language server is more compliant with the LSP protocol and doesn't have to deal with the weirdness of a wrapper like typescript-language-server, so I think a lot of the current functionality wouldn't apply, anyways. |
Deno has the fastest TypeScript LSP and is fully supported in nvim-lspconfig https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md#denols
Deno LSP is a work in progress, here is the current state: denoland/deno#8643
There are some limitations when using it with Web based code, but I have found that combined with https://github.com/evanw/esbuild you can get fantastic results. You need to make all imports deno compatible by using the
.ts
extension, but esbuild accepts that and bundles tojs
without problem.To use DOM based code add
/// <reference lib="dom" />
to each file.If you want to have a go, this will scaffold it for you:
The text was updated successfully, but these errors were encountered: