Skip to main content

LanguageFeatureProviderRegistry

Trait LanguageFeatureProviderRegistry 

Source
pub trait LanguageFeatureProviderRegistry:
    Environment
    + Send
    + Sync {
Show 27 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; fn ProvideRenameEdits<'life0, 'async_trait>( &'life0 self, DocumentURI: Url, PositionDTO: PositionDTO, NewName: String, ) -> Pin<Box<dyn Future<Output = Result<Option<Value>, CommonError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn ProvideDocumentSymbols<'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 ProvideWorkspaceSymbols<'life0, 'async_trait>( &'life0 self, Query: String, ) -> Pin<Box<dyn Future<Output = Result<Option<Value>, CommonError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn ProvideSignatureHelp<'life0, 'async_trait>( &'life0 self, DocumentURI: Url, PositionDTO: PositionDTO, ContextDTO: Value, ) -> Pin<Box<dyn Future<Output = Result<Option<Value>, CommonError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn ProvideFoldingRanges<'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 ProvideSelectionRanges<'life0, 'async_trait>( &'life0 self, DocumentURI: Url, Positions: Vec<PositionDTO>, ) -> Pin<Box<dyn Future<Output = Result<Option<Value>, CommonError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn ProvideSemanticTokensFull<'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 ProvideInlayHints<'life0, 'async_trait>( &'life0 self, DocumentURI: Url, RangeDTO: Value, ) -> Pin<Box<dyn Future<Output = Result<Option<Value>, CommonError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn ProvideTypeHierarchySupertypes<'life0, 'async_trait>( &'life0 self, ItemDTO: Value, ) -> Pin<Box<dyn Future<Output = Result<Option<Value>, CommonError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn ProvideTypeHierarchySubtypes<'life0, 'async_trait>( &'life0 self, ItemDTO: Value, ) -> Pin<Box<dyn Future<Output = Result<Option<Value>, CommonError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn ProvideCallHierarchyIncomingCalls<'life0, 'async_trait>( &'life0 self, ItemDTO: Value, ) -> Pin<Box<dyn Future<Output = Result<Option<Value>, CommonError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn ProvideCallHierarchyOutgoingCalls<'life0, 'async_trait>( &'life0 self, ItemDTO: Value, ) -> Pin<Box<dyn Future<Output = Result<Option<Value>, CommonError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn ProvideLinkedEditingRanges<'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 ProvideOnTypeFormattingEdits<'life0, 'async_trait>( &'life0 self, DocumentURI: Url, PositionDTO: PositionDTO, Character: String, OptionsDTO: Value, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<TextEditDTO>>, 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,

Source

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

Provides rename edits for a symbol at the given position.

Source

fn ProvideDocumentSymbols<'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,

Provides document symbols (outline) for the given document.

Source

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

Provides workspace symbols matching the given query.

Source

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

Provides signature help at the given position.

Source

fn ProvideFoldingRanges<'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,

Provides folding ranges for the given document.

Source

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

Provides selection ranges at the given positions.

Source

fn ProvideSemanticTokensFull<'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,

Provides semantic tokens for the full document.

Source

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

Provides inlay hints within the given range.

Source

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

Provides type hierarchy supertypes for the given item.

Source

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

Provides type hierarchy subtypes for the given item.

Source

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

Provides call hierarchy incoming calls for the given item.

Source

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

Provides call hierarchy outgoing calls for the given item.

Source

fn ProvideLinkedEditingRanges<'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,

Provides linked editing ranges at the given position.

Source

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

Provides on-type formatting edits.

Implementors§