40 ms·
"JavaScript is the best language for writing HTTP servers, because that is what web browsers use." Doesn't make any sense. LSP is just a protocol. You can writ
by ttt0 6y ago
"JavaScript is the best language for writing HTTP servers, because that is what web browsers use."
Doesn't make any sense. LSP is just a protocol. You can write language servers in whatever language you want.
- kazinator 6y agoBut, look at this project. They took a Bash parser written in C from the Tree-sitter project, and are using the C as a compiled WebAssembly blob out of TypeScript. And, actually, that Tree-sitter Bash parser is specified or generated using JS somehow; the project for producing it uses TypeScript also. That's how easy it is to write LSP server in any language? Maybe it's done this way so that the LSP can be integrated right into the editor itself, so as not to have to run somewhere else as an external piece.
- cle 6y agoWhat are you talking about? TypeScript has the best Language Server libraries, if you want maximum productivity when making a Language Server, you run with TypeScript. I don't even like TypeScript but I can at least acknowledge that it can make sense to implement a Language Server in it. Personally I would have used Go for this exact reason, but it's reasonable to use TypeScript too.