Struct

LspTextEdit

Description

struct LspTextEdit {
  LspRange _range;
  gchar* _new_text;
  gchar* _annotation_id;
}

A textual edit applicable to a text document.

Structure members
_range: LspRange

The range of the text document to be manipulated. To insert text into a document create a range where start ==== end.

_new_text: gchar*

The string to be inserted. For delete operations use an empty string.

_annotation_id: gchar*

An identifier referring to a change annotation managed by a workspace edit.

Usually clients provide options to group the changes along the annotations they are associated with. To support this in the protocol an edit or resource operation refers to a change annotation using an identifier and not the change annotation literal directly. This allows servers to use the identical annotation across multiple edits or resource operations which then allows clients to group the operations under that change annotation. The actual change annotations together with their identifers are managed by the workspace edit via the new property changeAnnotations.

Support for this is guarded by the client capability workspace.workspaceEdit.changeAnnotationSupport. If a client doesn’t signal the capability, servers shouldn’t send this back to the client and should leave this set to null.

Since:

3.16.0.

Instance methods

lsp_text_edit_init

Creates a new LspTextEdit.

lsp_text_edit_init_from_variant

Deserialize this from a GVariant.

lsp_text_edit_to_variant

Serialize this to a GVariant.

lsp_text_edit_get_range

Gets the value of range.

lsp_text_edit_set_range

Sets the value of range.

lsp_text_edit_get_new_text

Gets the value of new_text.

lsp_text_edit_set_new_text

Sets the value of new_text.

lsp_text_edit_get_annotation_id

Gets the value of annotation_id.

lsp_text_edit_set_annotation_id

Sets the value of annotation_id.