ClientCapabilities define capabilities for dynamic registration, workspace and text document features the client supports.
The experimental can be used to pass experimental capabilities under development.
For future compatibility a ClientCapabilities object literal can have more properties set than currently defined.
Servers receiving a ClientCapabilities object literal with unknown properties should ignore these properties.
A missing property should be interpreted as an absence of the capability. If a missing property normally defines sub properties,
all missing sub properties should be interpreted as an absence of the corresponding capability.
Position in a text document expressed as zero-based line and zero-based character offset.
A position is between two characters like an ‘insert’ cursor in an editor. Special values like for example -1 to
denote the end of a line are not supported.
A range in a text document expressed as (zero-based) start and end positions. A range is comparable to a selection in an editor.
Therefore the end position is exclusive. If you want to specify a range that contains a line including the
line ending character(s) then use an end position denoting the start of the next line. For example:
A request message to describe a request between the client and the server.
Every processed request must send a response back to the sender of the request.
A Response Message sent as a result of a request. If a request doesn’t provide a result value
the receiver of a request still needs to return a response message to conform to the JSON-RPC specification.
The result property of the ResponseMessage should be set to null in this case to signal a successful request.
A TraceValue represents the level of verbosity with which the server systematically reports its execution
trace using $/logTrace notifications. The initial trace value is set by the client at initialization
and can be modified later using the $/setTrace notification.
The base protocol offers support for request cancellation.
A request A request that got canceled still needs to return from the server and send a response back.
It can not be left open / hanging. This is in line with the JSON-RPC protocol
that requires that every request sends a response back. In addition it allows for
returning partial results on cancel. If the request returns an error response on cancellation it is
advised to set the error code to ErrorCodes.RequestCancelled.
To cancel a request, a notification message with the following properties is sent:
The initialize request is sent as the first request from the client to the server. If the server receives a request or notification
before the initialize request it should act as follows:
The initialized notification is sent from the client to the server after the client received the result of the initialize request but before the client is sending any other request or notification to the server. The server can use the initialized notification for example to dynamically register capabilities. The initialized notification may only be sent once.
A notification to log the trace of the server’s execution. The amount and content of these notifications depends
on the current trace configuration. If trace is ‘off’, the server should not send any logTrace notification. If trace is ‘messages’,
the server should not add the ‘verbose’ field in the LogTraceParams.
The base protocol offers also support to report progress in a generic fashion.
This mechanism can be used to report any kind of progress including work done progress
(usually used to report progress in the user interface using a progress bar) and partial
result progress to support streaming of results.
A progress notification has the following properties:
The shutdown request is sent from the client to the server. It asks the server to shut down, but to not exit
(otherwise the response might not be delivered correctly to the client). There is a separate exit notification
that asks the server to exit. Clients must not send any notifications other than exit or requests to a server
to which they have sent a shutdown request. Clients should also wait with sending the exit notification until
they have received a response from the shutdown request.