Crate sync_ls

Source
Expand description

A synchronous language server implementation.

Modules§

dap
A synchronous debug adaptor implementation.
lsp
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
RequestId
A request ID in the Language Server Protocol.
ResponseError
The common error type for the language server. 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.
ExtractError
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.

Functions§

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 future type for the language server.
ConnectionRx
The untyped connect rx for the language server.
ConnectionTx
The untyped connect tx for the language server.
DapBuilder
The language server builder serving DAP.
DapMessage
The common message type for the DAP protocol.
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 the language server.
ResponseFuture
A future that may be done in place or not.
SchedulableResponse
A future that could be rejected by common error in LspResponseFuture.
ScheduledResult
The result of a scheduled response which could be finally caught by schedule_tail.