Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

One thing I have difficulty understanding is that given MS is (was?) the primary proponent of LSP, and the spec was originally written with TS in mind, and VSCode has first class support for LSP, why do community projects like typescript-language-server (along with a bunch of others like the one by sourcegraph) need to exist ?

Why can't arbitrary LSP clients connect directly to tsserver (maintained by MS) ?

[1] https://github.com/typescript-language-server/typescript-lan...



> Why can't arbitrary LSP clients connect directly to tsserver (maintained by MS) ?

As far as I'm informed, they can.

For example, NeoVim language client has a pretty wide range of officially supported servers [0], including tsserver.

[0] https://github.com/neovim/nvim-lspconfig/blob/master/doc/ser...


It connects to a community maintained lsp server that wraps tsserver https://github.com/neovim/nvim-lspconfig/blob/master/doc/ser...


Is it not possible to connect to tsserver directly? If so, do you have any information why?


TSServer predates lsp iirc


Oh, so TSServer is not an LSP server?

That's why an arbitrary LSP client can't connect to it.


> Why can't arbitrary LSP clients connect directly to tsserver (maintained by MS) ?

Can you explain a bit more about why they can't connect?


Because tsserver (maintained by MS) is not an LSP server.

There is an open issue [1] that has been open since 2020.

[1] https://github.com/microsoft/TypeScript/issues/39459


tsserver isn't LSP compliant, iirc they started with tsserver way before LSP was out, but since then didn't migrated to LSP. I think they didn't migrated because:

- It's a big selling point for vscode. - It might hard to migrate what they have to LSP, they might implement a lot of non LSP standards. - Migrate to LSP could possibly delay new features because of the rewrite in tsserver.


I think the problem is that the tsserver for historical reasons even though is quite similar, still does NOT implement the LSP protocol. That's why you need another level here.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: