pub struct VampireLanguageService { /* private fields */ }Expand description
Vampire 语言服务
Implementations§
Trait Implementations§
Source§impl LanguageService for VampireLanguageService
impl LanguageService for VampireLanguageService
type Lang = VampireLanguage
type Vfs = MemoryVfs
Source§fn workspace(&self) -> &WorkspaceManager
fn workspace(&self) -> &WorkspaceManager
Get the workspace manager.
Source§fn get_source(&self, uri: &str) -> Option<Box<dyn Source + Sync + Send>>
fn get_source(&self, uri: &str) -> Option<Box<dyn Source + Sync + Send>>
Helper to get source from 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
Helper to get the root red node of a file.
Implementations should override this to provide actual parsing/caching.
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
Helper to run logic with the root node.
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
Helper to run logic with multiple root nodes in parallel.
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
Provide hover information. Defaults to None.
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
Provide folding ranges. Defaults to empty.
Source§fn document_symbols(
&self,
_uri: &str,
) -> impl Future<Output = Vec<StructureItem>> + Send
fn document_symbols( &self, _uri: &str, ) -> impl Future<Output = Vec<StructureItem>> + Send
Provide document symbols. Defaults to empty.
Source§fn workspace_symbols(
&self,
_query: &str,
) -> impl Future<Output = Vec<WorkspaceSymbol>> + Send
fn workspace_symbols( &self, _query: &str, ) -> impl Future<Output = Vec<WorkspaceSymbol>> + Send
Search for symbols in the entire workspace.
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
Helper to list all files recursively.
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
Find definition. Defaults to empty.
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
Find references. Defaults to empty.
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
Rename a symbol.
Source§fn completion<'a>(
&'a self,
_uri: &'a str,
_position: usize,
) -> impl Future<Output = Vec<CompletionItem>> + Send + 'a
fn completion<'a>( &'a self, _uri: &'a str, _position: usize, ) -> impl Future<Output = Vec<CompletionItem>> + Send + 'a
Provide completion items. Defaults to empty.
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
Provide diagnostics for a file. Defaults to empty.
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
Called when the language server is initialized.
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 initialized (notification).
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.
Auto Trait Implementations§
impl Freeze for VampireLanguageService
impl !RefUnwindSafe for VampireLanguageService
impl Send for VampireLanguageService
impl Sync for VampireLanguageService
impl Unpin for VampireLanguageService
impl UnwindSafe for VampireLanguageService
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> LanguageServiceExt for Twhere
T: LanguageService,
impl<T> LanguageServiceExt for Twhere
T: LanguageService,
Source§fn into_axum_router(self) -> Routerwhere
Self: Sized + 'static,
fn into_axum_router(self) -> Routerwhere
Self: Sized + 'static,
Converts the language service into an Axum router.
Source§impl<S> OakMcpService for S
impl<S> OakMcpService for S
Source§fn into_mcp_server(self) -> McpServer<Self>
fn into_mcp_server(self) -> McpServer<Self>
Convert this service into an Oak MCP server.
Source§fn into_mcp_axum_router(self) -> Router
fn into_mcp_axum_router(self) -> Router
Create an Axum router for this MCP service.