pub struct CompletionProviderConfig {
pub provider: CompletionProviderFn,
pub trigger_characters: Vec<char>,
pub activate_on_typing: bool,
pub render_item: Option<CompletionItemRenderer>,
}Expand description
Configuration for a single completion provider.
Fields§
§provider: CompletionProviderFnThe async completion function.
trigger_characters: Vec<char>Characters that trigger an immediate (no debounce) call.
activate_on_typing: boolIf true, call this provider on any keystroke (debounced).
render_item: Option<CompletionItemRenderer>Optional custom renderer for items from this provider.
When set, the popup uses this function to render each item instead of the default kind badge + label + detail layout. The renderer receives the item and a boolean indicating whether it is selected.
Trait Implementations§
Source§impl Clone for CompletionProviderConfig
impl Clone for CompletionProviderConfig
Source§fn clone(&self) -> CompletionProviderConfig
fn clone(&self) -> CompletionProviderConfig
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 CompletionProviderConfig
impl !RefUnwindSafe for CompletionProviderConfig
impl Send for CompletionProviderConfig
impl Sync for CompletionProviderConfig
impl Unpin for CompletionProviderConfig
impl UnsafeUnpin for CompletionProviderConfig
impl !UnwindSafe for CompletionProviderConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> SerializableKey for T
impl<T> SerializableKey for T
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.