updated capabilities

This commit is contained in:
2026-05-24 16:19:51 +02:00
parent 354965b425
commit 5a6adbc5e4
2 changed files with 15 additions and 5 deletions
+4 -2
View File
@@ -175,13 +175,15 @@ impl RustAnalyzer {
let value = rx.await?;
let envelope: JsonRpcResponse<R::Result> = serde_json::from_value(value)?;
let envelope: JsonRpcResponse<R::Result> = serde_json::from_value(value.clone())?;
if let Some(err) = envelope.error {
return Err(format!("LSP Error ({}): {}", err.code, err.message).into());
}
envelope.result.ok_or_else(|| "missing result".into())
envelope
.result
.ok_or_else(|| format!("missing result: {:?}", value).into())
}
pub async fn notify<T: Serialize>(&mut self, method: &str, req: T) -> std::io::Result<()> {