Method

LspCompletionItemset_insert_text

Declaration

void
lsp_completion_item_set_insert_text (
  LspCompletionItem* self,
  const gchar* value
)

Description

Sets the value of insert_text.

A string that should be inserted into a document when selecting this completion. When falsy the label is used as the insert text for this item.

The insertText is subject to interpretation by the client side. Some tools might not take the string literally. For example VS Code when code complete is requested in this example con<cursor position> and a completion item with an insertText of console is provided it will only insert sole. Therefore it is recommended to use textEdit instead since it avoids additional client side interpretation.

Parameters

value

Type: const gchar*

The new value of insert_text.

The argument can be NULL.
The data is owned by the caller of the method.
The value is a NUL terminated UTF-8 string.