Overview of the lsp library
masterThe lsp library is a framework designed for building Language Server Protocol (LSP) servers. It abstracts the complexities of the protocol by providing built-in support for:
- JSON-RPC Transport: Handling the underlying communication layer.
- Virtual File System (VFS): Managing and tracking document state in memory.
- Request/Notification Handling: Responding to LSP requests and notifications via registered handlers.
- Capability Management: Automatically setting server capabilities in the
initializerequest based on registered handlers, as well as supporting dynamic registration of capabilities. - Lifecycle & Progress: Managing cancellable requests and progress notifications.
- Diagnostics: Handling the publishing and flushing of diagnostic information.
It is part of a larger ecosystem including lsp-types (for protocol types) and lsp-test (for testing servers).