pub struct LspManager { /* private fields */ }Expand description
LSP Manager - manages multiple language server connections
Implementations§
Source§impl LspManager
impl LspManager
Sourcepub fn with_config(root_uri: Option<String>, settings: LspSettings) -> Self
pub fn with_config(root_uri: Option<String>, settings: LspSettings) -> Self
Create a new LSP manager with config-driven settings.
Sourcepub async fn get_client(&self, language: &str) -> Result<Arc<LspClient>>
pub async fn get_client(&self, language: &str) -> Result<Arc<LspClient>>
Get or create a client for the given language
Sourcepub async fn get_client_for_file(&self, path: &Path) -> Result<Arc<LspClient>>
pub async fn get_client_for_file(&self, path: &Path) -> Result<Arc<LspClient>>
Get a client for a file path (detects language from extension)
Sourcepub async fn handles_file(&self, path: &Path) -> bool
pub async fn handles_file(&self, path: &Path) -> bool
Check if any registered client handles the given file.
Sourcepub async fn capabilities_for(
&self,
language: &str,
) -> Option<ServerCapabilities>
pub async fn capabilities_for( &self, language: &str, ) -> Option<ServerCapabilities>
Get capabilities for a specific language server.
Sourcepub async fn close_document(&self, path: &Path) -> Result<()>
pub async fn close_document(&self, path: &Path) -> Result<()>
Close a document across all relevant clients.
Sourcepub async fn change_document(&self, path: &Path, content: &str) -> Result<()>
pub async fn change_document(&self, path: &Path, content: &str) -> Result<()>
Notify clients of a document change.
Sourcepub async fn shutdown_all(&self)
pub async fn shutdown_all(&self)
Shutdown all clients
Sourcepub async fn get_linter_client(
&self,
name: &str,
) -> Result<Option<Arc<LspClient>>>
pub async fn get_linter_client( &self, name: &str, ) -> Result<Option<Arc<LspClient>>>
Get or start a linter client by name (e.g. “eslint”, “ruff”).
Returns None if the linter is not configured or its binary is missing.
Sourcepub async fn linter_diagnostics(&self, path: &Path) -> Vec<DiagnosticInfo>
pub async fn linter_diagnostics(&self, path: &Path) -> Vec<DiagnosticInfo>
Collect diagnostics from all applicable linter servers for a file. Returns an empty vec if no linters match the file extension.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for LspManager
impl !RefUnwindSafe for LspManager
impl Send for LspManager
impl Sync for LspManager
impl Unpin for LspManager
impl UnsafeUnpin for LspManager
impl !UnwindSafe for LspManager
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ServiceExt for T
impl<T> ServiceExt for T
Source§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
Apply a transformation to the response body. Read more
Source§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using HTTP status codes. Read more
Source§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using gRPC headers. Read more