CompletionItem
A completion item represents a text snippet that is proposed to complete text that is being typed.
It is sufficient to create a completion item from just a label. In that case the completion item will replace the word until the cursor with the given label or insertText. Otherwise the given CompletionItem.textEdit is used.
When selecting a completion item in the editor its defined or synthesized text edit will be applied to all cursors/selections whereas additionalTextEdits will be applied as provided.
See also
Properties
An optional array of additional text edits that are applied when selecting this completion. Edits must not overlap with the main CompletionItem.textEdit nor with themselves.
An optional Command that is executed after inserting this completion. Note that additional modifications to the current document should be described with the additionalTextEdits-property.
An optional set of characters that when pressed while this completion is active will accept it first and then type that character. Note that all commit characters should have length=1
and that superfluous characters will be ignored.
A human-readable string that represents a doc-comment.
A string that should be used when filtering a set of completion items. When falsy
the label is used.
A string or snippet that should be inserted in a document when selecting this completion. When falsy
the label is used.
Keep whitespace of the insertText as is. By default, the editor adjusts leading whitespace of new lines so that they match the indentation of the line for which the item is accepted - setting this to true
will prevent that.
The kind of this completion item. Based on the kind an icon is chosen by the editor.
Tags for this completion item.