LanguageFeatureProviderRegistry

Trait LanguageFeatureProviderRegistry 

Source
pub trait LanguageFeatureProviderRegistry:
    Environment
    + Send
    + Sync {
Show 13 methods // Required methods fn RegisterProvider<'life0, 'async_trait>( &'life0 self, SideCarIdentifier: String, ProviderType: ProviderType, SelectorDTO: Value, ExtensionIdentifierDTO: Value, OptionsDTO: Option<Value>, ) -> Pin<Box<dyn Future<Output = Result<u32, CommonError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn UnregisterProvider<'life0, 'async_trait>( &'life0 self, Handle: u32, ) -> Pin<Box<dyn Future<Output = Result<(), CommonError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn ProvideCodeActions<'life0, 'async_trait>( &'life0 self, DocumentURI: Url, RangeOrSelectionDTO: Value, ContextDTO: Value, ) -> Pin<Box<dyn Future<Output = Result<Option<Value>, CommonError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn ProvideCodeLenses<'life0, 'async_trait>( &'life0 self, DocumentURI: Url, ) -> Pin<Box<dyn Future<Output = Result<Option<Value>, CommonError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn ProvideCompletions<'life0, 'async_trait>( &'life0 self, DocumentURI: Url, PositionDTO: PositionDTO, ContextDTO: CompletionContextDTO, CancellationTokenValue: Option<Value>, ) -> Pin<Box<dyn Future<Output = Result<Option<CompletionListDTO>, CommonError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn ProvideDefinition<'life0, 'async_trait>( &'life0 self, DocumentURI: Url, PositionDTO: PositionDTO, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<LocationDTO>>, CommonError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn ProvideDocumentFormattingEdits<'life0, 'async_trait>( &'life0 self, DocumentURI: Url, OptionsDTO: Value, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<TextEditDTO>>, CommonError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn ProvideDocumentHighlights<'life0, 'async_trait>( &'life0 self, DocumentURI: Url, PositionDTO: PositionDTO, ) -> Pin<Box<dyn Future<Output = Result<Option<Value>, CommonError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn ProvideDocumentLinks<'life0, 'async_trait>( &'life0 self, DocumentURI: Url, ) -> Pin<Box<dyn Future<Output = Result<Option<Value>, CommonError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn ProvideDocumentRangeFormattingEdits<'life0, 'async_trait>( &'life0 self, DocumentURI: Url, RangeDTO: Value, OptionsDTO: Value, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<TextEditDTO>>, CommonError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn ProvideHover<'life0, 'async_trait>( &'life0 self, DocumentURI: Url, PositionDTO: PositionDTO, ) -> Pin<Box<dyn Future<Output = Result<Option<HoverResultDTO>, CommonError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn ProvideReferences<'life0, 'async_trait>( &'life0 self, DocumentURI: Url, PositionDTO: PositionDTO, ContextDTO: Value, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<LocationDTO>>, CommonError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn PrepareRename<'life0, 'async_trait>( &'life0 self, DocumentURI: Url, PositionDTO: PositionDTO, ) -> Pin<Box<dyn Future<Output = Result<Option<Value>, CommonError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait;
}
Expand description

An abstract service contract for an environment component that can register, unregister, and invoke all types of language feature providers (e.g., for completions, hovers, definitions).

By consolidating all features into a single registry, we avoid the need for dozens of separate provider traits, simplifying the overall architecture.

Required Methods§

Source

fn RegisterProvider<'life0, 'async_trait>( &'life0 self, SideCarIdentifier: String, ProviderType: ProviderType, SelectorDTO: Value, ExtensionIdentifierDTO: Value, OptionsDTO: Option<Value>, ) -> Pin<Box<dyn Future<Output = Result<u32, CommonError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Registers a new language feature provider.

§Parameters
  • SideCarIdentifier: The ID of the sidecar hosting the provider.
  • ProviderType: The type of feature this provider implements.
  • SelectorDTO: The document selector that determines which documents this provider applies to.
  • ExtensionIdentifierDTO: The ID of the extension contributing the provider.
  • OptionsDTO: Optional, feature-specific options.
§Returns

A Result containing a unique handle (u32) for the new registration.

Source

fn UnregisterProvider<'life0, 'async_trait>( &'life0 self, Handle: u32, ) -> Pin<Box<dyn Future<Output = Result<(), CommonError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Unregisters a previously registered provider.

§Parameters
  • Handle: The unique handle of the provider registration to remove.
Source

fn ProvideCodeActions<'life0, 'async_trait>( &'life0 self, DocumentURI: Url, RangeOrSelectionDTO: Value, ContextDTO: Value, ) -> Pin<Box<dyn Future<Output = Result<Option<Value>, CommonError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn ProvideCodeLenses<'life0, 'async_trait>( &'life0 self, DocumentURI: Url, ) -> Pin<Box<dyn Future<Output = Result<Option<Value>, CommonError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn ProvideCompletions<'life0, 'async_trait>( &'life0 self, DocumentURI: Url, PositionDTO: PositionDTO, ContextDTO: CompletionContextDTO, CancellationTokenValue: Option<Value>, ) -> Pin<Box<dyn Future<Output = Result<Option<CompletionListDTO>, CommonError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn ProvideDefinition<'life0, 'async_trait>( &'life0 self, DocumentURI: Url, PositionDTO: PositionDTO, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<LocationDTO>>, CommonError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn ProvideDocumentFormattingEdits<'life0, 'async_trait>( &'life0 self, DocumentURI: Url, OptionsDTO: Value, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<TextEditDTO>>, CommonError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn ProvideDocumentHighlights<'life0, 'async_trait>( &'life0 self, DocumentURI: Url, PositionDTO: PositionDTO, ) -> Pin<Box<dyn Future<Output = Result<Option<Value>, CommonError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn ProvideDocumentRangeFormattingEdits<'life0, 'async_trait>( &'life0 self, DocumentURI: Url, RangeDTO: Value, OptionsDTO: Value, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<TextEditDTO>>, CommonError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn ProvideHover<'life0, 'async_trait>( &'life0 self, DocumentURI: Url, PositionDTO: PositionDTO, ) -> Pin<Box<dyn Future<Output = Result<Option<HoverResultDTO>, CommonError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn ProvideReferences<'life0, 'async_trait>( &'life0 self, DocumentURI: Url, PositionDTO: PositionDTO, ContextDTO: Value, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<LocationDTO>>, CommonError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn PrepareRename<'life0, 'async_trait>( &'life0 self, DocumentURI: Url, PositionDTO: PositionDTO, ) -> Pin<Box<dyn Future<Output = Result<Option<Value>, CommonError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§