class LSProtocol::CompletionItem
- LSProtocol::CompletionItem
- Reference
- Object
Overview
A completion item represents a text snippet that is proposed to complete text that is being typed.
Included Modules
- JSON::Serializable
Defined in:
lsprotocol/types.crConstructors
- .new(pull : JSON::PullParser)
- .new(label : String | Nil, additional_text_edits : Array(TextEdit) | Nil = nil, command : Command | Nil = nil, commit_characters : Array(String) | Nil = nil, data : LSPAny | Nil = nil, deprecated : Bool | Nil = nil, detail : String | Nil = nil, documentation : MarkupContent | String | Nil = nil, filter_text : String | Nil = nil, insert_text : String | Nil = nil, insert_text_format : InsertTextFormat | Nil = nil, insert_text_mode : InsertTextMode | Nil = nil, kind : CompletionItemKind | Nil = nil, label_details : CompletionItemLabelDetails | Nil = nil, preselect : Bool | Nil = nil, sort_text : String | Nil = nil, tags : Array(CompletionItemTag) | Nil = nil, text_edit : InsertReplaceEdit | TextEdit | Nil = nil, text_edit_text : String | Nil = nil)
Instance Method Summary
- #additional_text_edits : Array(TextEdit) | Nil
-
#command : Command | Nil
An optional
Command
that is executed after inserting this completion. - #commit_characters : Array(String) | Nil
-
#data : LSPAny | Nil
A data entry field that is preserved on a completion item between a
CompletionRequest
and aCompletionResolveRequest
. -
#deprecated : Bool | Nil
Indicates if this item is deprecated.
-
#detail : String | Nil
A human-readable string with additional information about this item, like type or symbol information.
-
#documentation : MarkupContent | String | Nil
A human-readable string that represents a doc-comment.
- #filter_text : String | Nil
- #insert_text : String | Nil
- #insert_text_format : InsertTextFormat | Nil
- #insert_text_mode : InsertTextMode | Nil
-
#kind : CompletionItemKind | Nil
The kind of this completion item.
-
#label : String
The label of this completion item.
- #label_details : CompletionItemLabelDetails | Nil
-
#preselect : Bool | Nil
Select this item when showing.
- #sort_text : String | Nil
-
#tags : Array(CompletionItemTag) | Nil
Tags for this completion item.
- #text_edit : InsertReplaceEdit | TextEdit | Nil
- #text_edit_text : String | Nil
Constructor Detail
Instance Method Detail
An optional Command
that is executed after inserting this completion. Note that
additional modifications to the current document should be described with the
CompletionItem#additionalTextEdits
-property.
A data entry field that is preserved on a completion item between a
CompletionRequest
and a CompletionResolveRequest
.
A human-readable string with additional information about this item, like type or symbol information.
A human-readable string that represents a doc-comment.
The kind of this completion item. Based of the kind an icon is chosen by the editor.
The label of this completion item.
The label property is also by default the text that is inserted when selecting this completion.
If label details are provided the label itself should be an unqualified name of the completion item.
Select this item when showing.
Note that only one completion item can be selected and that the tool / client decides which item that is. The rule is that the first item of those that match best is selected.