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

Deno language server to-do list #8643

Closed
32 of 43 tasks
kitsonk opened this issue Dec 7, 2020 · 15 comments
Closed
32 of 43 tasks

Deno language server to-do list #8643

kitsonk opened this issue Dec 7, 2020 · 15 comments
Labels
feat new feature (which has been agreed to/accepted) lsp related to the language server

Comments

@kitsonk
Copy link
Contributor

kitsonk commented Dec 7, 2020

Post the initial implementation of the language server, there are quite a few other features that need to be added as well as some "tech debt" from the initial implementation. We might want to break some of these off to individual issues, but it is good enough for now to have a "master" issue for tracking purposes.

Language Service Features

These are server capabilities provided by the language server protocol, which various editors can take advantage of. Most of these features are exposed here in visual studio code for TypeScript/JavaScript and provide a high level structure of how to take information from the tsc compiler isolate and bring it into Rust and send it back over the language server client. Specifically, the DefinitionProvider is a good model of how to add a feature. Looking at the cli/lsp/mod.rs for the GotoDefinition handling demonstrates calling into tsc and dealing with a response back, converting it to a valid lsp response.

Extension Configuration Options

There are several configuration/settings that are currently not respected by the language server, but should be.

Additional Items

  • The unit tests are quite spotty, and far from exhaustive, we need more unit tests
  • There is a basic integration test infrastructure, but we could use more integration tests
  • We need to provide typeahead completion for module registry via the language server, like the version 2 of the extension was able to do, but not have any of that in the extension, do it all from the language server.
  • The current branch only provides access to modules that are already in the DENO_DIR. We can in theory instruct Deno to go fetch additional remote modules, but that comes with risks, because people will be typing out modules in a lot of cases and we don't want to DDOS registries with bad modules names. So we need to figure out when is it ok to fetch modules, if we do it automatically, or not.
  • Deal with unicode and JavaScript properly. Investigate using swc's SourceMap to hold the in memory documents.
  • Consider using swc's jsdoc crate when handling JSDoc between TypeScript and the language service.
  • deno_lint should generate an unused tag as part of its diagnostic structure to flag unreachable code.
  • We can spawn off diagnostics for things like deno_lint or reformatting a document to a seperate thread, but we don't allow isolates to be sent to other threads, in order not to have to deal with managing the lock, but it would be good to have a dedicated thread for getting diagnostics from the compiler isolate as to not lock the main loop of the language service.
  • Re-work the static built assets... currently the language server is re-lining all the static type definition files... we were able to remove most of them from the Rust side during the build process, as they were actually present in the tsc snapshot and not needed anywhere else (except for a limit set for deno types). Now we need to have them all in the lsp in Rust to provide them on a goto definition situation.
@hrsh7th
Copy link
Contributor

hrsh7th commented Dec 26, 2020

Hi. How about dealing with deps.ts as a first-class dependency definition in deno lsp (not deno runtime)?

I have written golang recently and it was a great development experience.
I think it's due to only gopls.

I believe it makes a great development experience and consistency if deno lsp suggests completion by deps.ts and applies auto-import as by confirming it.

@hrsh7th
Copy link
Contributor

hrsh7th commented Dec 28, 2020

May I send PR for textDocument/rename?

@bartlomieju
Copy link
Member

Hi. How about dealing with deps.ts as a first-class dependency definition in deno lsp (not deno runtime)?

I have written golang recently and it was a great development experience.
I think it's due to only gopls.

I believe it makes a great development experience and consistency if deno lsp suggests completion by deps.ts and applies auto-import as by confirming it.

There's still quite a lot we need to work on achieve parity with old version of vscode-deno before we can work on new features.

May I send PR for textDocument/rename?

Of course!

@hrsh7th
Copy link
Contributor

hrsh7th commented Dec 30, 2020

I will tackle to support completionItem/resolve.

@uki00a
Copy link
Contributor

uki00a commented Jan 30, 2021

I'll try to implement textDocument/signatureHelp (SignatureHelpProvider).

@hrsh7th
Copy link
Contributor

hrsh7th commented Feb 10, 2021

microsoft/TypeScript#39459

@David-Else
Copy link

Hi, the LSP is not currently providing documentation for the completion, is this on the Language Service Features list? hrsh7th/nvim-compe#187

@jeanp413
Copy link
Contributor

Hi I would like to work on the SelectionRangeProvider

@jeanp413
Copy link
Contributor

I'll work on the FoldingRangeProvider

@jeanp413
Copy link
Contributor

jeanp413 commented Apr 2, 2021

I'll work on the DocumentSymbolProvider

@jeanp413
Copy link
Contributor

jeanp413 commented Apr 7, 2021

I'll tackle CallHierarchyProvider

@jeanp413
Copy link
Contributor

I'll tackle SemanticTokensProvider

@kitsonk
Copy link
Contributor Author

kitsonk commented Apr 16, 2021

@jeanp413 thank you, I will get to dealing with your other contributions early next week, just needed to work on something else this week.

@bartlomieju
Copy link
Member

@kitsonk it appears to me that this issue is done at this point. Can we close it now?

@kitsonk
Copy link
Contributor Author

kitsonk commented Dec 1, 2021

Yeah, we can track other bits in individual issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat new feature (which has been agreed to/accepted) lsp related to the language server
Projects
None yet
Development

No branches or pull requests

6 participants