Typescript: tsserver should implement the Language Server Protocol

Created on 7 Jul 2020  路  3Comments  路  Source: microsoft/TypeScript

Search Terms

language server protocol

Suggestion

As the language server protocol ( https://github.com/Microsoft/language-server-protocol ) is getting more and more popularity and clients ( https://github.com/Microsoft/language-server-protocol/wiki/Protocol-Implementations ), it would be very useful to have the tsserver implement this protocol.

This is a duplicate of issue #11274, which the OP closed because at that time, there existed two reasonable-looking LSP implementations for TypeScript.

But the times have changed. The Theia IDE now uses a VS Code extension for its TypeScript needs, and in the last eighteen months, Sourcegraph's server has received exactly one update by a sentient person.

There continue to be requests for LSP support within #11724 despite its Closed status. The OP has expressed no interest in revisiting the issue.

Use Cases

It would be useful to programmers who use TypeScript but don't use VS Code.

Checklist

My suggestion meets these guidelines:

  • [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
  • [x] This wouldn't change the runtime behavior of existing JavaScript code
  • [x] This could be implemented without emitting different JS based on the types of the expressions
  • [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
  • [x] This feature would agree with the rest of TypeScript's Design Goals.
In Discussion Suggestion

Most helpful comment

We're working on this, albeit slowly. tsserver's implementation predates LSP so it's nontrivial work to move forward in a way that doesn't adversely affect old clients or result in code duplication.

Your favorite IDE should misplace their blame somewhere else 馃檭

All 3 comments

Is there any traction on this? I feel like this should be somewhat high priority, but only because my favorite IDE's all blame TypeScript's non-conformance to the Language Server Protocol as the reason TypeScript support is _buggy_.

How bad is this issue, and how difficult would it be to remedy? Thanks. I'd also be interested in links to reading material that might enlighten me on the subject.

We're working on this, albeit slowly. tsserver's implementation predates LSP so it's nontrivial work to move forward in a way that doesn't adversely affect old clients or result in code duplication.

Your favorite IDE should misplace their blame somewhere else 馃檭

@RyanCavanaugh If you are looking for a testing environment may I suggest vim with vim-lsp.

Was this page helpful?
0 / 5 - 0 ratings