pub struct CompletionItem {
pub label: String,
pub kind: CompletionItemKind,
pub detail: Option<String>,
pub documentation: Option<String>,
pub insert_text: Option<String>,
pub sort_text: Option<String>,
pub filter_text: Option<String>,
pub additional_edits: Vec<(ByteSpan, String)>,
pub text_edit_range: Option<(usize, usize)>,
pub commit_characters: Option<Vec<String>>,
}Expand description
A single completion suggestion.
Fields§
§label: StringThe text to insert.
kind: CompletionItemKindKind of completion.
detail: Option<String>Optional detail text.
documentation: Option<String>Optional documentation.
insert_text: Option<String>Text to insert (if different from label).
sort_text: Option<String>Sort priority (lower is better).
filter_text: Option<String>Filter text for matching.
additional_edits: Vec<(ByteSpan, String)>Additional text edits to apply.
text_edit_range: Option<(usize, usize)>Range to replace in the document (for proper prefix handling).
commit_characters: Option<Vec<String>>Commit characters that trigger auto-insertion (LSP 3.0+). Each entry must be exactly one character per LSP spec.
Trait Implementations§
Source§impl Clone for CompletionItem
impl Clone for CompletionItem
Source§fn clone(&self) -> CompletionItem
fn clone(&self) -> CompletionItem
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CompletionItem
impl RefUnwindSafe for CompletionItem
impl Send for CompletionItem
impl Sync for CompletionItem
impl Unpin for CompletionItem
impl UnsafeUnpin for CompletionItem
impl UnwindSafe for CompletionItem
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more