Method

LspCompletionItemget_insert_text

Declaration

const gchar*
lsp_completion_item_get_insert_text (
  LspCompletionItem* self
)

Description

Gets 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.

Return value

Type: const gchar*

The value of insert_text.

The returned data is owned by the instance.
The return value can be NULL.
The value is a NUL terminated UTF-8 string.