Enumeration

LspInsertTextMode

Declaration

enum Lsp.InsertTextMode

Description

How whitespace and indentation is handled during completion item insertion.

Since: 3.16.0.

Members

LSP_INSERT_TEXT_MODE_UNSET

No description available.

  • Value: 0
  • Available since: 3.0
LSP_INSERT_TEXT_MODE_AS_IS

The insertion or replacement string is taken as it is.

If the value is multi line the lines below the cursor will be inserted using the indentation defined in the string value. The client will not apply any kind of adjustments to the string.

  • Value: 1
  • Available since: 3.0
LSP_INSERT_TEXT_MODE_ADJUST_INDENTATION

The editor adjusts leading whitespace of new lines so that they match the indentation up to the cursor of the line for which the item is accepted.

Consider a line like this: <2tabs><3tabs>foo. Accepting a multi line completion item is indented using 2 tabs and all following lines inserted will be indented using 2 tabs as well.

  • Value: 2
  • Available since: 3.0