rune-langium / lsp-server/src / RuneLspServer
Interface: RuneLspServer
Defined in: packages/lsp-server/src/rune-dsl-server.ts:58
A fully-wired Rune DSL LSP server instance.
Remarks
Returned by createRuneLspServer. Exposes the underlying @lspeasy/server instance and Langium services for advanced use cases (testing, custom middleware, capability introspection).
Pitfalls
- Do NOT call
listen()before the server is fully initialized — all Langium providers are registered duringcreateRuneLspServer()synchronously viastartLanguageServer(shared). The server is ready to accept connections as soon as this factory function returns. - Diagnostics are sent as
textDocument/publishDiagnosticsnotifications (not responses). Clients must register a notification handler; they will not appear as request responses. - Do NOT access
sharedorservicesfrom a concurrent request handler without understanding Langium's document locking model — document builds and index updates are not thread-safe.
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
server | LSPServer<ServerCapabilities<any>> | The underlying @lspeasy/server instance. | packages/lsp-server/src/rune-dsl-server.ts:60 |
services | LangiumServices | Langium language services for Rune DSL. | packages/lsp-server/src/rune-dsl-server.ts:64 |
shared | LangiumSharedServices | Langium shared services (for testing / advanced use). | packages/lsp-server/src/rune-dsl-server.ts:62 |
Methods
listen()
ts
listen(transport): Promise<void>;Defined in: packages/lsp-server/src/rune-dsl-server.ts:66
Bind the server to a transport and start processing messages.
Parameters
| Parameter | Type |
|---|---|
transport | Transport |
Returns
Promise<void>