Adventures in the land of Language Servers (2023)
6 points by abhin4v
6 points by abhin4v
Great talk! I work on the internal LSP for Erlang, and the protocol is such a crap (to me at least). Everything about the protocol feels like designed to be used from TypeScript-only, there even are no actual docs but a set of convoluted TypeScript types and interfaces with deep inheritance all the way down.
Having written some LSP-supporting stuff over the years, I'm surprised:
there even are no actual docs
I've always found the spec excellently sufficient, complete and well-elaborated. Also certainly immediately mentally translatable into any language with basic structs.
but a set of convoluted TypeScript types
Feed the JSON Schema files metaModel.json & metaModel.schema.json to your codegen code in any lang of your choosing: I never found this all too troubling, just some real grunt work.
(Btw a nice project idea here would be a general polyglot codegen tool that feeds on those 2 files and has codegens (for message structs and server-side plus client-side stubs) for various popular languages ... if anyone's looking for inspiration =)
Hum, is that metaModel.json file using a custom API spec? Are there standard codegen tools that support it?
That doesn't solve the problem with lack of proper documentation, though. JSON files and types with comments are not a documentation...