(path: &Path, ctx: &ToolContext)
| 221 | } |
| 222 | |
| 223 | async fn get_lsp_diagnostics(path: &Path, ctx: &ToolContext) -> String { |
| 224 | #[cfg(feature = "lsp")] |
| 225 | { |
| 226 | use opencode_lsp::detect_language; |
| 227 | |
| 228 | if let Some(lsp_registry) = &ctx.lsp_registry { |
| 229 | return get_lsp_diagnostics_impl(path, lsp_registry.clone()).await; |
| 230 | } |
| 231 | } |
| 232 | |
| 233 | #[cfg(not(feature = "lsp"))] |
| 234 | { |
| 235 | let _ = (path, ctx); |
| 236 | } |
| 237 | |
| 238 | String::new() |
| 239 | } |
| 240 | |
| 241 | #[cfg(feature = "lsp")] |
| 242 | async fn get_lsp_diagnostics_impl( |
no test coverage detected