pub struct BufferWordsSource { /* private fields */ }Expand description
Completion source that provides words from the current buffer
Implementations§
Source§impl BufferWordsSource
impl BufferWordsSource
Sourcepub const fn with_min_word_length(self, len: usize) -> Self
pub const fn with_min_word_length(self, len: usize) -> Self
Set minimum word length
Trait Implementations§
Source§impl Default for BufferWordsSource
impl Default for BufferWordsSource
Source§impl SourceSupport for BufferWordsSource
impl SourceSupport for BufferWordsSource
Source§fn source_id(&self) -> &'static str
fn source_id(&self) -> &'static str
Unique identifier for this source (e.g., “buffer”, “lsp”, “path”)
Source§fn complete<'a>(
&'a self,
ctx: &'a CompletionContext,
content: &'a str,
) -> Pin<Box<dyn Future<Output = Vec<CompletionItem>> + Send + 'a>>
fn complete<'a>( &'a self, ctx: &'a CompletionContext, content: &'a str, ) -> Pin<Box<dyn Future<Output = Vec<CompletionItem>> + Send + 'a>>
Fetch completions asynchronously Read more
Source§fn is_available(&self, _ctx: &CompletionContext) -> bool
fn is_available(&self, _ctx: &CompletionContext) -> bool
Check if this source is available for the given context Read more
Source§fn resolve<'a>(
&'a self,
item: &'a CompletionItem,
) -> Pin<Box<dyn Future<Output = CompletionItem> + Send + 'a>>
fn resolve<'a>( &'a self, item: &'a CompletionItem, ) -> Pin<Box<dyn Future<Output = CompletionItem> + Send + 'a>>
Optional: Resolve additional details for a completion item Read more
Source§fn execute(&self, _item: &CompletionItem)
fn execute(&self, _item: &CompletionItem)
Optional: Execute post-selection action Read more
Auto Trait Implementations§
impl Freeze for BufferWordsSource
impl RefUnwindSafe for BufferWordsSource
impl Send for BufferWordsSource
impl Sync for BufferWordsSource
impl Unpin for BufferWordsSource
impl UnwindSafe for BufferWordsSource
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 more