CompletionProvider

Trait CompletionProvider 

Source
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§

Source

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

Source

fn can_provide(&self, context: &CompletionContext) -> bool

Check if this provider can handle the completion request

Provided Methods§

Source

fn priority(&self) -> i32

Get provider priority

Implementors§