Struct languageserver_types::CompletionItem [] [src]

pub struct CompletionItem {
    pub label: String,
    pub kind: Option<CompletionItemKind>,
    pub detail: Option<String>,
    pub documentation: Option<Documentation>,
    pub sort_text: Option<String>,
    pub filter_text: Option<String>,
    pub insert_text: Option<String>,
    pub insert_text_format: Option<InsertTextFormat>,
    pub text_edit: Option<TextEdit>,
    pub additional_text_edits: Option<Vec<TextEdit>>,
    pub command: Option<Command>,
    pub data: Option<Value>,
}

Fields

The label of this completion item. By default also the text that is inserted when selecting this completion.

The kind of this completion item. Based of the kind an icon is chosen by the editor.

A human-readable string with additional information about this item, like type or symbol information.

A human-readable string that represents a doc-comment.

A string that shoud be used when comparing this item with other items. When falsy the label is used.

A string that should be used when filtering a set of completion items. When falsy the label is used.

A string that should be inserted a document when selecting this completion. When falsy the label is used.

The format of the insert text. The format applies to both the insertText property and the newText property of a provided textEdit.

An edit which is applied to a document when selecting this completion. When an edit is provided the value of insertText is ignored.

An optional array of additional text edits that are applied when selecting this completion. Edits must not overlap with the main edit 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 data entry field that is preserved on a completion item between a completion and a completion resolve request.

Methods

impl CompletionItem
[src]

[src]

Create a CompletionItem with the minimum possible info (label and detail).

Trait Implementations

impl Debug for CompletionItem
[src]

[src]

Formats the value using the given formatter. Read more

impl PartialEq for CompletionItem
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Default for CompletionItem
[src]

[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations