Crate sync_ls

Source
Expand description

A synchronous language server implementation.

Modules§

dap
A synchronous debug adaptor server implementation.
lsp
A synchronous LSP server implementation.
req_queue
The request-response queue for the LSP server.
transport
Transport layer for LSP messages.

Structs§

Connection
Connection is just a pair of channels of LSP messages.
LsBuilder
The builder pattern for the language server.
LsDriver
The language server driver.
LspClient
The host for the language server, or known as the LSP client.
LspClientRoot
The root of the language server host. Will close connection when dropped.
ProtocolError
A protocol error happened during communication through LSP or DAP.
RequestId
A request ID in the Language Server Protocol.
ResponseError
The common error type for language servers. A response from the server.
TConnectionRx
The sender of the language server.
TConnectionTx
The sender of the language server.
TypedLspClient
A Lsp client with typed service S.

Enums§

ErrorCode
The error codes defined by the JSON RPC.
EventOrMessage
This is a helper enum to handle both events and messages.
ExtractError
Failure of decoding happened during communication through LSP or DAP.
Message
The common message type for the language server.
MessageKind
The kind of the message.
ServiceState
An enum to represent the state of the language server.

Traits§

GetMessageKind
Gets the kind of the message.
Initializer
A trait that initializes the language server.
LsHook
A trait that defines the hook for the language server.

Functions§

erased_response
Erases the response type to a generic JsonValue.
internal_error
Creates an internal error.
invalid_params
Creates an invalid params error.
invalid_request
Creates an invalid request error.
just_future
A helper function to create a LspResponseFuture
just_ok
A helper function to create a LspResponseFuture
just_result
A helper function to create a LspResponseFuture
method_not_found
Creates a method not found error.
not_initialized
Creates a not initialized error.

Type Aliases§

AnySchedulableResponse
The common response future type for language servers.
ConnectionRx
The untyped connect rx for language servers.
ConnectionTx
The untyped connect tx for language servers.
DapBuilder
The language server builder serving DAP.
DapMessage
The common message type for the DAP protocol.
Event
The common event type for language servers.
LspBuilder
The language server builder serving LSP.
LspMessage
The common message type for the LSP protocol.
LspResponseFuture
A future that may be rejected before actual started.
LspResult
The common result type for language servers.
ResponseFuture
A future that may be done in place or not.
SchedulableResponse
A future that could be rejected by common error in LspResponseFuture.
ScheduleResult
The result of a scheduling response
ScheduledResult
The result of a scheduled response which could be finally caught by schedule_tail.