Interface CompletionItemDefaults

In many cases the items of an actual completion result share the same value for properties like commitCharacters or the range of a text edit. A completion list can therefore define item defaults which will be used if a completion item itself doesn't specify the value.

If a completion list specifies a default value and a completion item also specifies a corresponding value, the rules for combining these are defined by applyKinds (if the client supports it), defaulting to ApplyKind.Replace.

Servers are only allowed to return default values if the client signals support for this via the completionList.itemDefaults capability.

3.17.0

interface CompletionItemDefaults {
    commitCharacters?: string[];
    data?: any;
    editRange?: Range | EditRangeWithInsertReplace;
    insertTextFormat?: InsertTextFormat;
    insertTextMode?: InsertTextMode;
}

Properties

commitCharacters?: string[]

A default commit character set.

3.17.0

data?: any

A default data value.

3.17.0

A default edit range.

3.17.0

insertTextFormat?: InsertTextFormat

A default insert text format.

3.17.0

insertTextMode?: InsertTextMode

A default insert text mode.

3.17.0