Class AutoCompletionItem
Represents an item in the auto-completion list of IUIMultiLineTextInput.
Inherited Members
Namespace: DevToys.Api
Assembly: DevToys.Api.dll
Syntax
public class AutoCompletionItem
Constructors
AutoCompletionItem(string, AutoCompletionItemKind, string)
Initializes a new instance of the AutoCompletionItem class.
Declaration
public AutoCompletionItem(string title, AutoCompletionItemKind kind, string textToInsert)
Parameters
Type | Name | Description |
---|---|---|
string | title | The title of the completion item. |
AutoCompletionItemKind | kind | The kind of this completion item. Based on the kind an icon is chosen by the editor. |
string | textToInsert | A snippet that should be inserted in a document when selecting this completion item. |
Properties
Description
Gets or sets the description of the completion item, displayed to the right of the suggestion list.
Declaration
public string? Description { get; set; }
Property Value
Type | Description |
---|---|
string |
Documentation
Gets or sets a human-readable string that represents a doc-comment. This string can be in Markdown format.
Declaration
public string? Documentation { get; set; }
Property Value
Type | Description |
---|---|
string |
Kind
Gets or sets the kind of this completion item. Based on the kind an icon is chosen by the editor.
Declaration
public AutoCompletionItemKind Kind { get; set; }
Property Value
Type | Description |
---|---|
AutoCompletionItemKind |
ShouldBePreselected
Gets or sets whether the item should be selected when showing.
Declaration
public bool? ShouldBePreselected { get; set; }
Property Value
Type | Description |
---|---|
bool? |
Remarks
Note that only one completion item can be selected and that the editor decides which item that is. The rule is that the first item of those that match best is selected.
TextToInsert
Gets or sets a snippet that should be inserted in a document when selecting this completion item.
Declaration
public string TextToInsert { get; set; }
Property Value
Type | Description |
---|---|
string |
Remarks
You can use tab-stopped placeholders by using a syntax like ${1:foo}
and ${2:bar}
.
Example:
registerCustomer(${1:firstName}, ${2:lastName})
Title
Gets or sets the title of the completion item.
Declaration
public string Title { get; set; }
Property Value
Type | Description |
---|---|
string |