pub trait CompletionProvider: Send + Sync {
// Required methods
fn provide_completions<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 CompletionContext,
) -> Pin<Box<dyn Future<Output = Result<Vec<CompletionItem>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn can_provide(&self, context: &CompletionContext) -> bool;
// Provided method
fn priority(&self) -> i32 { ... }
}
Expand description
Provider for argument completion
Required Methods§
Sourcefn provide_completions<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 CompletionContext,
) -> Pin<Box<dyn Future<Output = Result<Vec<CompletionItem>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn provide_completions<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 CompletionContext,
) -> Pin<Box<dyn Future<Output = Result<Vec<CompletionItem>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Provide completions for the given context
Sourcefn can_provide(&self, context: &CompletionContext) -> bool
fn can_provide(&self, context: &CompletionContext) -> bool
Check if this provider can handle the completion request