[−][src]Struct lsp_types::CompletionItem
Fields
label: StringThe label of this completion item. By default also the text that is inserted when selecting this completion.
kind: Option<CompletionItemKind>The kind of this completion item. Based of the kind an icon is chosen by the editor.
detail: Option<String>A human-readable string with additional information about this item, like type or symbol information.
documentation: Option<Documentation>A human-readable string that represents a doc-comment.
deprecated: Option<bool>Indicates if this item is deprecated.
preselect: Option<bool>Select this item when showing.
sort_text: Option<String>A string that shoud be used when comparing this item
with other items. When falsy the label is used.
filter_text: Option<String>A string that should be used when filtering a set of
completion items. When falsy the label is used.
insert_text: Option<String>A string that should be inserted a document when selecting
this completion. When falsy the label is used.
insert_text_format: Option<InsertTextFormat>The format of the insert text. The format applies to both the insertText property
and the newText property of a provided textEdit.
text_edit: Option<TextEdit>An edit which is applied to a document when selecting this completion. When an edit is provided the value of insertText is ignored.
additional_text_edits: Option<Vec<TextEdit>>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.
command: Option<Command>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.
data: Option<Value>An data entry field that is preserved on a completion item between a completion and a completion resolve request.
Methods
impl CompletionItem[src]
pub fn new_simple(label: String, detail: String) -> CompletionItem[src]
Create a CompletionItem with the minimum possible info (label and detail).
Trait Implementations
impl Default for CompletionItem[src]
fn default() -> CompletionItem[src]
impl Clone for CompletionItem[src]
fn clone(&self) -> CompletionItem[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl PartialEq<CompletionItem> for CompletionItem[src]
fn eq(&self, other: &CompletionItem) -> bool[src]
fn ne(&self, other: &CompletionItem) -> bool[src]
impl Debug for CompletionItem[src]
impl Serialize for CompletionItem[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer, [src]
__S: Serializer,
impl<'de> Deserialize<'de> for CompletionItem[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl Unpin for CompletionItem
impl Send for CompletionItem
impl Sync for CompletionItem
impl RefUnwindSafe for CompletionItem
impl UnwindSafe for CompletionItem
Blanket Implementations
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>, [src]
T: Deserialize<'de>,