pub trait FeatureProvider:
Send
+ Sync
+ 'static {
// Required methods
fn semantic_tokens(&self, document: &Document) -> Vec<LexSemanticToken>;
fn document_symbols(&self, document: &Document) -> Vec<LexDocumentSymbol>;
fn folding_ranges(&self, document: &Document) -> Vec<LexFoldingRange>;
fn hover(
&self,
document: &Document,
position: AstPosition,
) -> Option<HoverResult>;
fn goto_definition(
&self,
document: &Document,
position: AstPosition,
) -> Vec<AstRange>;
fn references(
&self,
document: &Document,
position: AstPosition,
include_declaration: bool,
) -> Vec<AstRange>;
fn document_links(&self, document: &Document) -> Vec<AstDocumentLink>;
fn format_document(
&self,
document: &Document,
source: &str,
rules: Option<FormattingRules>,
) -> Vec<TextEditSpan>;
fn format_range(
&self,
document: &Document,
source: &str,
range: FormattingLineRange,
rules: Option<FormattingRules>,
) -> Vec<TextEditSpan>;
fn completion(
&self,
document: &Document,
position: AstPosition,
current_line: Option<&str>,
workspace: Option<&CompletionWorkspace>,
trigger_char: Option<&str>,
) -> Vec<CompletionCandidate>;
fn execute_command(
&self,
command: &str,
arguments: &[Value],
) -> Result<Option<Value>>;
}Required Methods§
fn semantic_tokens(&self, document: &Document) -> Vec<LexSemanticToken>
fn document_symbols(&self, document: &Document) -> Vec<LexDocumentSymbol>
fn folding_ranges(&self, document: &Document) -> Vec<LexFoldingRange>
fn hover( &self, document: &Document, position: AstPosition, ) -> Option<HoverResult>
fn goto_definition( &self, document: &Document, position: AstPosition, ) -> Vec<AstRange>
fn references( &self, document: &Document, position: AstPosition, include_declaration: bool, ) -> Vec<AstRange>
fn document_links(&self, document: &Document) -> Vec<AstDocumentLink>
fn format_document( &self, document: &Document, source: &str, rules: Option<FormattingRules>, ) -> Vec<TextEditSpan>
fn format_range( &self, document: &Document, source: &str, range: FormattingLineRange, rules: Option<FormattingRules>, ) -> Vec<TextEditSpan>
fn completion( &self, document: &Document, position: AstPosition, current_line: Option<&str>, workspace: Option<&CompletionWorkspace>, trigger_char: Option<&str>, ) -> Vec<CompletionCandidate>
fn execute_command( &self, command: &str, arguments: &[Value], ) -> Result<Option<Value>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".