Haskell library for the Language Server Protocol
open sourceMITfree
lsp is a Haskell library for building Language Server Protocol servers, implementing the 3.15 specification. lsp-types gives type-safe definitions that match the specification's TypeScript ones, and lsp handles JSON-RPC transport, an in-memory virtual file system of open documents, request and notification handlers, server capabilities, dynamic registration, cancellable requests, progress notifications and diagnostics. A third package in the repository, lsp-test, is a testing framework for language servers. Haskell Language Server is built on it.
Problems it solves
- write a language server for my own language in Haskell
- add editor support for my DSL using the Language Server Protocol
- test my language server's responses automatically
Features
- type-safe LSP 3.15 types (lsp-types)
- JSON-RPC transport and handlers
- virtual file system for open documents
- dynamic capability registration, cancellable requests, progress and diagnostics
- lsp-test for functional tests of language servers
Alternatives
The same job
These do what lsp (Haskell) does.
- Haskell Language Server The official Haskell language server (LSP) implementation
- Eclipse JDT Language Server A Java language server that works with any editor speaking the Language Server Protocol
- TypeScript Language Server Language Server Protocol wrapper around TypeScript's tsserver
