edit_text_document_async


Description:

public async void edit_text_document_async (Uri uri, int64 version, TextDocumentContentChangeEvent[] content_changes) throws Error

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 open_text_document_async). In 2.0 the shape of the params has changed to include proper version numbers.

Parameters:

uri

the URI of the document that has been modified

version

the version numebr points to the version after all provided content changes have been applied

content_changes

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 `TextDocumentContentChangeEvent`s in a single notification in the order you receive them.