pub struct InlineCompletionItem {
pub insert_text: String,
pub filter_text: Option<String>,
pub range: Option<Range>,
pub command: Option<Command>,
pub insert_text_format: Option<InsertTextFormat>,
}Expand description
An inline completion item represents a text snippet that is proposed inline to complete text that is being typed.
@since 3.18.0
Fields§
§insert_text: StringThe text to replace the range with. Must be set. Is used both for the preview and the accept operation.
filter_text: Option<String>A text that is used to decide if this inline completion should be
shown. When falsy the [InlineCompletionItem::insertText] is
used.
An inline completion is shown if the text to replace is a prefix of the filter text.
range: Option<Range>The range to replace. Must begin and end on the same line.
Prefer replacements over insertions to provide a better experience when the user deletes typed text.
command: Option<Command>An optional command that is executed after inserting this completion.
insert_text_format: Option<InsertTextFormat>The format of the insert text. The format applies to the insertText.
If omitted defaults to InsertTextFormat.PlainText.
Trait Implementations§
Source§impl Clone for InlineCompletionItem
impl Clone for InlineCompletionItem
Source§fn clone(&self) -> InlineCompletionItem
fn clone(&self) -> InlineCompletionItem
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more