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

typescript-language-server no longer maintained #250

Closed
lynndylanhurley opened this issue May 24, 2020 · 23 comments
Closed

typescript-language-server no longer maintained #250

lynndylanhurley opened this issue May 24, 2020 · 23 comments
Labels
question Further information is requested

Comments

@lynndylanhurley
Copy link

It looks like the typescript-language-server library is no longer actively maintained (source).

There's another language server that supports both javascript and typescript that seems to be more active (javascript-language-server). Would that be a better option?

@ghost
Copy link

ghost commented May 28, 2020

I didn't really want to make a github issue out of this since this isn't really one but I just realized that coc-tsserver from coc.nvim works on singular .ts files without actually initializing a typescript project in that directory while this both this and tsserver only work if there's a tsconfig. Is there any way I can obtain the same behavior here ?

Both my typescript and lua are trash but I think it's because of the default values coc-tsserver comes with.
https://github.com/neoclide/coc-tsserver/blob/bac002caef532d6dc58c10a2885eeed463082d4f/package.json

Edit: It seems it's not really possible in this case.
sourcegraph/javascript-typescript-langserver#433

@lynndylanhurley
Copy link
Author

@pyrr yeah I think we're dependent on the language server itself for that. Not sure why that issue was closed - did they resolve the issue maybe?

@ghost
Copy link

ghost commented May 28, 2020

I don't think so.

@leungbk
Copy link

leungbk commented Jun 9, 2020

It looks like the typescript-language-server library is no longer actively maintained (source).

There's another language server that supports both javascript and typescript that seems to be more active (javascript-language-server). Would that be a better option?

The repo you are suggesting hasn't received any updates to the actual source code in more than a year---really, look at the commit history. That project also has some problems with memory leaks: sourcegraph/javascript-typescript-langserver#447

It might be easier for someone to take over the Theia project instead.

@saltmade
Copy link

I'd like to promo this issue as well that asks Microsoft to make TSServer (theirs) support LSP (also theirs) microsoft/TypeScript#11274.

@glepnir
Copy link
Member

glepnir commented Jun 18, 2020

This is the reason why I have not switched to use nvim-lsp from coc. coc-tsserver has always worked great. And typescript-lang-server is no longer maintained

@whitebyte
Copy link

FWIW Sourcegraph language server mentioned by OP also seems abandoned, all the activity there comes from deps-update bots

@lynndylanhurley
Copy link
Author

lynndylanhurley commented Jun 22, 2020

@whitebyte are there any other options? The coc-tsserver plugin seems to work really well for coc.nvim. Is there any way to adapt that plugin to work for nvim-lsp?

@whitebyte
Copy link

@lynndylanhurley unfortunately I'm not aware of any other options

@lynndylanhurley
Copy link
Author

lynndylanhurley commented Aug 19, 2020

@kuator I ended up switching back to coc. I'm mostly using TS these days and coc-tsserver is just way better than the nvim-lsp typescript plugin.

@pyrho
Copy link

pyrho commented Aug 19, 2020

@lynndylanhurley I've switched from coc to lsp for the past week. While I agree that it's worrying that typescript-language-server is no longer maintained, I don't really have an issue with my current LSP setup compared to coc.

May I know what did not work for you?

@lynndylanhurley
Copy link
Author

@pyrho I kept getting stale / glitchy linting errors. Also the editor would occasionally freeze completely 1-2 times per day.

I switched back to coc to see if that resolved the issue. I haven't had the freezing issue at all, but I do occasionally get bad linting results. In those cases I can just run CocReset and it resolves the issue. Not sure if there's an equivalent command for the nvim LSP - the only way I knew how to resolve with nvim-lsp was to exit vim and restart.

@pyrho
Copy link

pyrho commented Aug 19, 2020

I did notice a bad freeze/hang/OOM with LSP that I never had with coc; thanks for sharing.

@kuator
Copy link

kuator commented Aug 19, 2020

@kuator I ended up switching back to coc. I'm mostly using TS these days and coc-tsserver is just way better than the nvim-lsp typescript plugin.

Thanks for the suggestion, I used to use coc.nvim, it's an amazing plugin, but I'm gonna stick to nvim-lsp. I mostly write python, so typescript support is not big of a deal for me.

@justinmk
Copy link
Member

justinmk commented Aug 30, 2020

coc uses vscode (which has many extensions that provide in-process LSP servers). Is there some reason why nvim-lsp could not also use vscode as the LSP server? That seems like the best approach for any LSP client, since most vscode extensions that provide LSP aren't going to bother to provide standalone versions.

@pyrho
Copy link

pyrho commented Aug 30, 2020

@justinmk You make it sound easy, are you sure :) ?

For Typescript CoC uses coc-tsserver which looks like it spawns a tsserver process and interacts with it via stdin/out.
I think nvim-typescript does something similar; eg. not really LSP but just an in-house wrapper around tsserver.

typescript-language-server provides an LSP interface to tsserver (unlike the two aforementioned repos) so that nvim's LSP can "talk" with tsserver.

We need all this needless complexity because tsserver does not have an LSP interface.

You are exponentially more knowledgeable than me (<3), so there is a good chance everything I just said is just non sense, but that's my two cents.

@justinmk
Copy link
Member

You make it sound easy, are you sure :) ?

it's definitely not easy, I wonder if coc could be leveraged as a library or a dependency somehow. Haven't looked into whether this is a goal of coc. And it's probably a bit silly since then nvim-lsp is kinda redundant.

I think nvim-typescript does something similar; eg. not really LSP but just an in-house wrapper around tsserver.

oh. so what's the problem?

We need all this needless complexity because tsserver does not have an LSP interface.

the way LSP seems to be going is that many "LSP" impls are done as in-process vscode extensions, because it's just easier for the author. Which of course defeats the purpose of LSP. But if this trend continues then vscode will be a de facto necessary dependency of all LSP clients.

@pyrho
Copy link

pyrho commented Aug 30, 2020

And it's probably a bit silly since then nvim-lsp is kinda redundant.

Agreed.

I think nvim-typescript does something similar; eg. not really LSP but just an in-house wrapper around tsserver.

oh. so what's the problem?

From my limited understanding, the code from coc (or nvim-typescript) could be adapted to talk to an LSP-able client, acting as an LSP abstraction layer in front of tsserver; I also don't think it would be too hard to do.

(note: coc uses official vscode packages to interact with tsserver, found here)

The problem is finding someone with enough time on their hands to actually do it (I'm trying to stop making promise I can't fulfill P:).

But if this trend continues then vscode will be a de facto necessary dependency of all LSP clients.

Do you mean like an actual VSCode instance acting as a server, with which other out-of-memory programs can interact with? Is such API already live?


It just hit me, I've been rambling about re-using code from here or there, but we already have a "wrapper around tsserver that speaks LSP", that's already exactly what typescript-language-server is; it just needs a new maintainer.
As for interacting directly with VSCode (eg. nvim <> vscode <> tsserver instead of nvim <> tsserver) , that's outside of my knowledge.

@justinmk justinmk added question Further information is requested and removed bug Something isn't working labels Aug 30, 2020
nomasprime added a commit to nomasprime/IDEOS that referenced this issue Sep 10, 2020
After reading this issue
(neovim/nvim-lspconfig#250) I've decided to
move to CoC for completion, at least until NeoVim release something
comparable and stable.

- Swapped nvim-lsp for coc.nvim config
- Installed CoC extensions that provide similar functionality
    - coc-python
    - coc-solargraph
    - coc-snippets
- Swapped honza/vim-snippets for my own fork because coc-snippets
  doesn't currently support prioritising sources, ie, need to remove
  duplicates to avoid being asked to choose
- Swap jiangmiao/auto-pairs for coc-pairs (better integration with CoC)
- Incidentally installed coc-json to edit coc-settings.json
- Separated out Solargraph role
- Coordinated CoC and NeoMake (still using NeoMake for Test strategy)
    - Improved custom signs
    - Stopped NeoMake running automatically
- Removed Shougo/deoplete.nvim in favour of CoC's built-in completion
- Integrated with Shougo/denite.nvim
    - Added my own fork of neoclide/coc-denite to support arrow function
      symbols (neoclide/coc-tsserver#2)
    - Updated maps
- Added initial maps for CoC
@Chocrates
Copy link

👋 To keep this conversation going, the theia lsp server, https://github.com/theia-ide/typescript-language-server appears to have been picked up by someone, it has commits in the last 25 days as of this writing.

https://github.com/sourcegraph/javascript-typescript-langserver has been archived and points to the theia lsp among other options.

Typescript claims to be slowly implementing LSP functionality but so far its hard to track microsoft/TypeScript#39459

Should we update the README to point back to the theia LSP? I am having trouble getting it running myself.

@mjlbach
Copy link
Contributor

mjlbach commented Dec 21, 2020

Isn't this no longer an issue as typescript-language-server is now maintained, and @Chocrates I believe the documentation does point to theia LSP?

https://github.com/theia-ide/typescript-language-server
`typescript-language-server` can be installed via `:LspInstall tsserver` or by yourself with `npm`:
```sh
npm install -g typescript-language-server
```

@David-Else
Copy link
Contributor

@kuator
Copy link

kuator commented Dec 25, 2020

Deno now has a built-in LSP for JS and TS in Rust:

https://deno.land/posts/v1.6#built-in-deno-language-server
https://marketplace.visualstudio.com/items?itemName=denoland.vscode-deno-canary

They are working on it:

denoland/deno#8643

Does it allow to use it in non-deno projects?

@mjlbach
Copy link
Contributor

mjlbach commented Dec 25, 2020

@David-Else @kuator If you want to continue this discussion (and test) this PR #491

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.