ExternalLspCompletionClient

Trait ExternalLspCompletionClient 

Source
pub trait ExternalLspCompletionClient: Send + Sync {
    // Required methods
    fn forward_completion<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        language: &'life1 str,
        uri: &'life2 str,
        code: &'life3 str,
        position: Position,
    ) -> Pin<Box<dyn Future<Output = CompletionResult<Option<Vec<CompletionItem>>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn is_available(&self, language: &str) -> bool;
}
Expand description

Trait for external LSP completion client

Required Methods§

Source

fn forward_completion<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, language: &'life1 str, uri: &'life2 str, code: &'life3 str, position: Position, ) -> Pin<Box<dyn Future<Output = CompletionResult<Option<Vec<CompletionItem>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Forward completion request to external LSP

§Arguments
  • language - Programming language
  • uri - Document URI
  • code - Source code
  • position - Cursor position
§Returns

Completion items from external LSP, or None if unavailable

Source

fn is_available(&self, language: &str) -> bool

Check if external LSP is available for language

Implementors§