10 comments

[ 2.0 ms ] story [ 14.1 ms ] thread
Started in case I ever build a language server, thanks! The interface looks very understandable, and the debug server looks really nice.

Now that I think about it, it might be really cool to add LSP to my CLI framework[0] (I already have tab completion for shells, why not make an editor plugin if it's this easy ..)

0: https://github.com/bbkane/warg

Very nice. Now I want to build a language server. If only I had anything to build it for.

   // DiagnosticSeverity indicates the severity of a diagnostic.
   type DiagnosticSeverity int
Hmmm :robot:
I really like the interface-based auto-registration pattern, so elegeant!

The implementation of HoverHandler seems clever... no manual wiring. That's the kind of API design that makes Go's implicit interfaces shine.

I'm curious: How does error recovery work when a handler panics? Does the server keep the connection alive, or does it tear down?