pub struct LeanLanguageService { /* private fields */ }Implementations§
Source§impl LeanLanguageService
impl LeanLanguageService
pub fn new(config: LeanLanguage) -> Self
Trait Implementations§
Source§impl LanguageService for LeanLanguageService
Available on crate feature lsp only.
impl LanguageService for LeanLanguageService
Available on crate feature
lsp only.Source§type Lang = LeanLanguage
type Lang = LeanLanguage
The language type this service supports.
Source§fn workspace(&self) -> &WorkspaceManager
fn workspace(&self) -> &WorkspaceManager
Returns a reference to the workspace manager.
Source§fn get_source(&self, uri: &str) -> Option<<Self::Vfs as Vfs>::Source>
fn get_source(&self, uri: &str) -> Option<<Self::Vfs as Vfs>::Source>
Retrieves the source content for a given URI from the VFS.
Source§fn get_root(
&self,
_uri: &str,
) -> impl Future<Output = Option<RedNode<'_, Self::Lang>>> + Send
fn get_root( &self, _uri: &str, ) -> impl Future<Output = Option<RedNode<'_, Self::Lang>>> + Send
Retrieves the root red node of a file for the given URI. Read more
Source§fn with_root<'a, R, F>(
&'a self,
uri: &'a str,
f: F,
) -> impl Future<Output = Option<R>> + Send + 'a
fn with_root<'a, R, F>( &'a self, uri: &'a str, f: F, ) -> impl Future<Output = Option<R>> + Send + 'a
Executes a closure with the root red node of a file. Read more
Source§fn with_roots<'a, R, F>(
&'a self,
uris: Vec<String>,
f: F,
) -> impl Future<Output = Vec<R>> + Send + 'a
fn with_roots<'a, R, F>( &'a self, uris: Vec<String>, f: F, ) -> impl Future<Output = Vec<R>> + Send + 'a
Executes a closure with multiple root nodes in parallel. Read more
Source§fn hover(
&self,
_uri: &str,
_range: Range<usize>,
) -> impl Future<Output = Option<Hover>> + Send
fn hover( &self, _uri: &str, _range: Range<usize>, ) -> impl Future<Output = Option<Hover>> + Send
Provides hover information for a specific range in a file. Read more
Source§fn folding_ranges(
&self,
_uri: &str,
) -> impl Future<Output = Vec<FoldingRange>> + Send
fn folding_ranges( &self, _uri: &str, ) -> impl Future<Output = Vec<FoldingRange>> + Send
Provides folding ranges for a file.
Source§fn document_symbols<'a>(
&'a self,
uri: &'a str,
) -> impl Future<Output = Vec<StructureItem>> + Send + 'a
fn document_symbols<'a>( &'a self, uri: &'a str, ) -> impl Future<Output = Vec<StructureItem>> + Send + 'a
Provides document symbols (structure) for a file. Read more
Source§fn workspace_symbols<'a>(
&'a self,
query: String,
) -> impl Future<Output = Vec<WorkspaceSymbol>> + Send + 'a
fn workspace_symbols<'a>( &'a self, query: String, ) -> impl Future<Output = Vec<WorkspaceSymbol>> + Send + 'a
Provides workspace-wide symbol search based on a query string. Read more
Source§fn list_all_files(
&self,
root_uri: &str,
) -> impl Future<Output = Vec<String>> + Send
fn list_all_files( &self, root_uri: &str, ) -> impl Future<Output = Vec<String>> + Send
Recursively lists all files in the VFS starting from the given root URI. Read more
Source§fn definition<'a>(
&'a self,
uri: &'a str,
range: Range<usize>,
) -> impl Future<Output = Vec<LocationRange>> + Send + 'a
fn definition<'a>( &'a self, uri: &'a str, range: Range<usize>, ) -> impl Future<Output = Vec<LocationRange>> + Send + 'a
Finds the definition(s) of a symbol at the specified range. Read more
Source§fn document_highlight<'a>(
&'a self,
_uri: &'a str,
_range: Range<usize>,
) -> impl Future<Output = Vec<DocumentHighlight>> + Send + 'a
fn document_highlight<'a>( &'a self, _uri: &'a str, _range: Range<usize>, ) -> impl Future<Output = Vec<DocumentHighlight>> + Send + 'a
Provides document highlights for a symbol at the specified range.
Source§fn code_action<'a>(
&'a self,
_uri: &'a str,
_range: Range<usize>,
) -> impl Future<Output = Vec<CodeAction>> + Send + 'a
fn code_action<'a>( &'a self, _uri: &'a str, _range: Range<usize>, ) -> impl Future<Output = Vec<CodeAction>> + Send + 'a
Provides code actions for a specific range in a file.
Source§fn formatting<'a>(
&'a self,
_uri: &'a str,
) -> impl Future<Output = Vec<TextEdit>> + Send + 'a
fn formatting<'a>( &'a self, _uri: &'a str, ) -> impl Future<Output = Vec<TextEdit>> + Send + 'a
Provides formatting edits for a file.
Source§fn range_formatting<'a>(
&'a self,
_uri: &'a str,
_range: Range<usize>,
) -> impl Future<Output = Vec<TextEdit>> + Send + 'a
fn range_formatting<'a>( &'a self, _uri: &'a str, _range: Range<usize>, ) -> impl Future<Output = Vec<TextEdit>> + Send + 'a
Provides range formatting edits for a file.
Source§fn rename<'a>(
&'a self,
_uri: &'a str,
_range: Range<usize>,
_new_name: String,
) -> impl Future<Output = Option<WorkspaceEdit>> + Send + 'a
fn rename<'a>( &'a self, _uri: &'a str, _range: Range<usize>, _new_name: String, ) -> impl Future<Output = Option<WorkspaceEdit>> + Send + 'a
Provides rename edits for a symbol at the specified range.
Source§fn semantic_tokens<'a>(
&'a self,
_uri: &'a str,
) -> impl Future<Output = Option<SemanticTokens>> + Send + 'a
fn semantic_tokens<'a>( &'a self, _uri: &'a str, ) -> impl Future<Output = Option<SemanticTokens>> + Send + 'a
Provides semantic tokens for a file.
Source§fn completion<'a>(
&'a self,
_uri: &'a str,
_offset: usize,
) -> impl Future<Output = Vec<CompletionItem>> + Send + 'a
fn completion<'a>( &'a self, _uri: &'a str, _offset: usize, ) -> impl Future<Output = Vec<CompletionItem>> + Send + 'a
Provides completion items for a file at the specified position. Read more
Source§fn signature_help<'a>(
&'a self,
_uri: &'a str,
_range: Range<usize>,
) -> impl Future<Output = Option<SignatureHelp>> + Send + 'a
fn signature_help<'a>( &'a self, _uri: &'a str, _range: Range<usize>, ) -> impl Future<Output = Option<SignatureHelp>> + Send + 'a
Provides signature help for a symbol at the specified range. Read more
Source§fn inlay_hint<'a>(
&'a self,
_uri: &'a str,
_range: Range<usize>,
) -> impl Future<Output = Vec<InlayHint>> + Send + 'a
fn inlay_hint<'a>( &'a self, _uri: &'a str, _range: Range<usize>, ) -> impl Future<Output = Vec<InlayHint>> + Send + 'a
Provides inlay hints for a file. Read more
Source§fn references<'a>(
&'a self,
_uri: &'a str,
_range: Range<usize>,
) -> impl Future<Output = Vec<LocationRange>> + Send + 'a
fn references<'a>( &'a self, _uri: &'a str, _range: Range<usize>, ) -> impl Future<Output = Vec<LocationRange>> + Send + 'a
Finds all references to a symbol at the specified range.
Source§fn type_definition<'a>(
&'a self,
_uri: &'a str,
_range: Range<usize>,
) -> impl Future<Output = Vec<LocationRange>> + Send + 'a
fn type_definition<'a>( &'a self, _uri: &'a str, _range: Range<usize>, ) -> impl Future<Output = Vec<LocationRange>> + Send + 'a
Finds the type definition of a symbol at the specified range.
Source§fn implementation<'a>(
&'a self,
_uri: &'a str,
_range: Range<usize>,
) -> impl Future<Output = Vec<LocationRange>> + Send + 'a
fn implementation<'a>( &'a self, _uri: &'a str, _range: Range<usize>, ) -> impl Future<Output = Vec<LocationRange>> + Send + 'a
Finds the implementation(s) of a symbol at the specified range.
Source§fn initialize<'a>(
&'a self,
_params: InitializeParams,
) -> impl Future<Output = ()> + Send + 'a
fn initialize<'a>( &'a self, _params: InitializeParams, ) -> impl Future<Output = ()> + Send + 'a
Handles an LSP initialize request.
Source§fn initialized<'a>(&'a self) -> impl Future<Output = ()> + Send + 'a
fn initialized<'a>(&'a self) -> impl Future<Output = ()> + Send + 'a
Called when the language server is fully initialized.
Source§fn shutdown<'a>(&'a self) -> impl Future<Output = ()> + Send + 'a
fn shutdown<'a>(&'a self) -> impl Future<Output = ()> + Send + 'a
Called when the language server is shut down.
Source§fn did_save<'a>(&'a self, _uri: &'a str) -> impl Future<Output = ()> + Send + 'a
fn did_save<'a>(&'a self, _uri: &'a str) -> impl Future<Output = ()> + Send + 'a
Called when a file is saved in the editor.
Source§fn did_close<'a>(
&'a self,
_uri: &'a str,
) -> impl Future<Output = ()> + Send + 'a
fn did_close<'a>( &'a self, _uri: &'a str, ) -> impl Future<Output = ()> + Send + 'a
Called when a file is closed in the editor.
Source§fn diagnostics<'a>(
&'a self,
_uri: &'a str,
) -> impl Future<Output = Vec<Diagnostic>> + Send + 'a
fn diagnostics<'a>( &'a self, _uri: &'a str, ) -> impl Future<Output = Vec<Diagnostic>> + Send + 'a
Provides diagnostics for a file.
Auto Trait Implementations§
impl !Freeze for LeanLanguageService
impl !RefUnwindSafe for LeanLanguageService
impl Send for LeanLanguageService
impl Sync for LeanLanguageService
impl Unpin for LeanLanguageService
impl UnsafeUnpin for LeanLanguageService
impl UnwindSafe for LeanLanguageService
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more