MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / get_lsp_diagnostics

Function get_lsp_diagnostics

crates/opencode-tool/src/write.rs:223–239  ·  view source on GitHub ↗
(path: &Path, ctx: &ToolContext)

Source from the content-addressed store, hash-verified

221}
222
223async 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")]
242async fn get_lsp_diagnostics_impl(

Callers 1

executeMethod · 0.85

Calls 3

get_lsp_diagnostics_implFunction · 0.85
newFunction · 0.85
cloneMethod · 0.45

Tested by

no test coverage detected