LSPClient class
The LSPClient provides a standardised interface to send messages to an LSP server
and to react to responses received. In order to send notifications, any of the predefined send
methods, prefixed with notify, can be used.
Since the LSP model identifies request-response pairs using IDs, in order to send requests and asynchronously await responses, use the sendRequest method and specify a callback. The LSPClient instance will handle ID-ing the requests and responses, as well as converting responses from JSON to native types and subsequently triggering the callbacks.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
responseStream
→ Stream<
ServerResponse> -
latefinal
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
closeServer(
) → Future< void> -
initClient(
{required String host, required int port}) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyTextDocumentDidChange(
{required String path, required AffogatoDocument document, required List< TextEdit> contentChanges}) → void -
notifyTextDocumentDidOpen(
{required String path, required AffogatoDocument document, required String language}) → void -
requestTextDocumentCompletion(
{required String path, required Position position, required void callback(CompletionRequestResponse)}) → void -
send(
Map< String, dynamic> payload) → void -
sendInit(
{required AffogatoVFS vfs}) → void -
sendRequest(
Map< String, dynamic> payload, void handler(JSON)) → void -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited