Method

LspServertext_document_did_change_async

Declaration

void
lsp_server_text_document_did_change_async (
  LspServer* self,
  LspClient* client,
  LspTextDocumentIdentifier* text_document,
  LspTextDocumentContentChangeEvent* content_changes,
  gint content_changes_length1,
  GAsyncReadyCallback _callback_,
  void* _callback__target
)

Description

The document change notification is sent from the client to the server to signal changes to a text document. Before a client can change a text document it must claim ownership of its content using the textDocument/didOpen notification (see lsp_server_text_document_did_open_async() ).

Parameters

client

Type: LspClient

No description available.

The data is owned by the caller of the method.
text_document

Type: LspTextDocumentIdentifier

The text document with a version number set.

The data is owned by the caller of the method.
content_changes

Type: An array of LspTextDocumentContentChangeEvent

The actual content changes. The content changes describe single state changes to the document. So if there are two content changes c1 (at array index 0) and c2 (at array index 1) for a document in state S then c1 moves the document from S to S2 and c2 from S2 to S3. So c1 is computed on the state S and c2 is computed on the state S2. To mirror the content of a document using change events use the following approach: - start with the same initial content - apply the ‘textDocument/didChange’ notifications in the order you receive them. - apply the TextDocumentContentChangeEvents in a single notification in the order you receive them.

The length of the array is specified in the content_changes_length1 argument.
The data is owned by the caller of the method.
content_changes_length1

Type: gint

No description available.

_callback_

Type: GAsyncReadyCallback

No description available.

The argument can be NULL.
_callback__target

Type: void*

No description available.

The argument can be NULL.
The data is owned by the caller of the method.