Extensions can register Language Server Protocol (LSP) providers to add language support for syntax highlighting, code completion, diagnostics, and more.
LanguageServerRegistry
Register a provider
The extension parameter is the file extension (without dot) that this server handles. Klyx will start the server when the user opens a file with this extension.
Unregister a provider
Check for a provider
LanguageServerProvider
Your implementation should:
- Accept a
LanguageClient (used to send notifications/requests to the editor)
- Start your language server (e.g., via a subprocess, embedded JVM, WASM, etc.)
- Return a
LanguageServer instance that the editor uses to send requests
LanguageServerRegistration
Important notes
- The LSP API requires a working LSP server binary. You may need to bundle one or download it at runtime.
- The server process handles requests from Klyx for the associated file type.
- Klyx manages the server lifecycle — starting it when needed and stopping it when the file is closed.
Last modified on July 11, 2026