-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
tsserver should implement the Language Server Protocol #39459
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. |
@RyanCavanaugh is there a branch to track? Or what is the best way to track the work on that? |
@RyanCavanaugh In line with last comment: any list of issues/tasks that someone could tackle on free time to help with this? |
From Eclipse Wild Web Developer perspective, we'd also gladly participate in some testing of this feature when it's available for experiments. We're not looking for a 100% LSP conformance from day 1, we're just looking for a sustainable and more standard alternative to the https://github.com/theia-ide/typescript-language-server and we'd gladly migrate to standard tsserver LSP support even if we lose a few features by the way. We'll more easily be able to contribute to tsserver after we can have a minimum viable experimental LSP support. |
I don't have any major updates; as Ryan mentioned, the work is happening bit by bit, but we are working on it so I've at least labeled the issue as such. One thing that @minestarks mentioned to me is that it would be good to have a channel with implementers who plan to use an LSP server so that we can potentially coordinate and hear more about use-cases. If you're an LSP client implementer, I'd encourage you to just drop a reply here. |
I'm not directly an LSP client implementer, but I'm hoping to use tsserver as a language server in https://github.com/apexskier/nova-typescript as a language server for Nova instead of typescript-language-server. |
And I am willing to help with any tasks that might help @apexskier achieve that goal because I much prefer Nova and I work all day on build tools for large TypeScript monorepos. |
I guess we all(lsp client maintainers) have one use-case - we want to access the
@leungbk and I are maintainers of Emacs LSP client - https://emacs-lsp.github.io |
@DanielRosenwasser I'd be interested in being included - I'm the maintainer of |
@joaotavora, the author of eglot, another LSP client for Emacs, may also be interested. |
Happy to continue to work on it If I may. |
We appreciate that - but this is a fairly large work item, and on top of that I think we need to work closely with our editor teams to make sure both sides of the LSP implementation are working correctly. For example, VS or VS Code might implement some specific field of a request in theory, but they might implement it differently, or there may have been some oversight. There are also situations where we need to discuss adding some support for some TypeScript-specific extension that the LSP doesn't specify as part of its core list of request types. For that reason, I think it would be best for having someone on the core team tackle this. |
@DanielRosenwasser does that mean your implementation might not be useable in other editors? |
Not addressed to me, but I can tell you from experience with the Deno language server, just adhering to the LSP protocol is only half the battle. What you fill in is quite complex. There is a lot of logic that currently isn't in tsc. So it doesn't mean it won't be unusable by other editors, but it will and does come with opinions. There is a whole set of them in what is in the TypeScript plugin for vscode that would need to be moved to tsc. So I can totally see the need for tight integration, let alone the need to provide the same thing for VS (which likely has had different opinions on that glue code). For example, vscode uses |
It's really the same as how TSServer integration works today. We add functionality to it, and we strive not to break clients that aren't aware of the changes. Clients then have to add some functionality if they wish to support a new feature. The same would be true of how we develop for LSP. |
@kitsonk @DanielRosenwasser thanks for the insight! It's great to see, that there's something happening behind the scenes :) |
@DanielRosenwasser I don't think it's correct to assume same support or even quality expectations between how TSServer would support LSP vs its internal protocol. |
@DanielRosenwasser thank you for the clarity and transparency - appreciate the classic dilemma (better handled by core team, but also limited resources on core team). Somewhat orthogonal to the LSP/tsserver discussion: would there be value in pushing something forward here now that would help someone on the core team later? Or should this really be end-to-end taken by someone on core? Asking in good faith; clearly there's community demand. |
Hi TypeScript team, any update on this? It seems nothing happened since Sep 2021, and it's not part of the TS 4.7 Iteration Plan (#48027) or overall roadmap either. Is it the right conclusion it has no priority and we should set our expectations accordingly? |
If it ever happens, I hope tsserver plugin API survives as https://github/vuedx/languagetools depends on it. |
The sensible thing to do is support tsserver for probably years to come, and LSP in addition to that. That will give all editors and plugin authors plenty of chance to replace their tsserver implementations with LSP. This being added to the spec very recently is of great help: microsoft/language-server-protocol#737 |
Is it ok to close the issue When this issue got traction, Given how things played out, it looks like this will not be a priority anytime soon. |
I've closed issues after years of them being open as a good solution was found, and I have had issues I have never closed because no one has ever solved the problem in years. I fundamentally believe issues should only ever be closed if they are resolved. |
Search Terms
language server protocol
Suggestion
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:
The text was updated successfully, but these errors were encountered: