From b6b52146844de2df0e423f4e3fcb04d2b0510015 Mon Sep 17 00:00:00 2001 From: Klesti Selimaj Date: Fri, 26 Jun 2026 17:06:53 +0200 Subject: [PATCH] Fixed proc macro server error --- crates/analyzer/src/rust_analyzer.rs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/crates/analyzer/src/rust_analyzer.rs b/crates/analyzer/src/rust_analyzer.rs index b75d717..3e55a45 100644 --- a/crates/analyzer/src/rust_analyzer.rs +++ b/crates/analyzer/src/rust_analyzer.rs @@ -103,7 +103,8 @@ impl RustAnalyzer { pub fn new( notification_tx: tokio::sync::mpsc::UnboundedSender, ) -> Result> { - let mut child = tokio::process::Command::new("rust-analyzer") + let mut child = tokio::process::Command::new("rustup") + .args(["run", "stable", "rust-analyzer"]) .stdin(Stdio::piped()) .stdout(Stdio::piped()) .stderr(Stdio::piped()) @@ -129,7 +130,10 @@ impl RustAnalyzer { match stderr.read(&mut buf).await { Ok(0) => break, Ok(n) => { - eprintln!("[ra-stderr] {}", String::from_utf8_lossy(&buf[..n]).trim_end()); + eprintln!( + "[ra-stderr] {}", + String::from_utf8_lossy(&buf[..n]).trim_end() + ); } Err(e) => { eprintln!("[ra-stderr] read error: {e}"); @@ -323,11 +327,8 @@ impl RustAnalyzer { } pub async fn initialized(&mut self) -> Result<(), Box> { - self.notify( - ::METHOD, - InitializedParams {}, - ) - .await?; + self.notify(::METHOD, InitializedParams {}) + .await?; Ok(()) } }