use std::sync::Arc;
use crate::lsp::LspManager;
#[async_trait::async_trait]
impl crate::lsp::ops::LspProvider for LspManager {
async fn get_or_start(
&self,
language: &str,
workspace_root: &std::path::Path,
mux_override: Option<bool>,
) -> anyhow::Result<Arc<dyn crate::lsp::ops::LspClientOps>> {
let client = LspManager::get_or_start(self, language, workspace_root, mux_override).await?;
Ok(client as Arc<dyn crate::lsp::ops::LspClientOps>)
}
async fn notify_file_changed(&self, path: &std::path::Path) {
LspManager::notify_file_changed(self, path).await
}
async fn shutdown_all(&self) {
LspManager::shutdown_all(self).await
}
async fn is_ready(&self, language: &str, workspace_root: &std::path::Path) -> bool {
LspManager::get(self, language, workspace_root)
.await
.is_some()
}
async fn record_first_response(
&self,
language: &str,
workspace_root: &std::path::Path,
elapsed_ms: i64,
) {
LspManager::record_first_response_inner(self, language, workspace_root, elapsed_ms).await;
}
}