From bd6ec062373147421b8a396bb49c4cbc7cc98b3b Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Sun, 30 Jul 2023 14:35:20 +0200 Subject: [PATCH] Write proc-macro server spawn errors to the status text --- crates/rust-analyzer/src/reload.rs | 5 +++++ editors/code/src/ctx.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/rust-analyzer/src/reload.rs b/crates/rust-analyzer/src/reload.rs index 18d9151d4aa..0a2bb822475 100644 --- a/crates/rust-analyzer/src/reload.rs +++ b/crates/rust-analyzer/src/reload.rs @@ -114,6 +114,11 @@ impl GlobalState { if self.proc_macro_clients.iter().any(|it| it.is_err()) { status.health = lsp_ext::Health::Warning; message.push_str("Failed to spawn one or more proc-macro servers.\n\n"); + for err in self.proc_macro_clients.iter() { + if let Err(err) = err { + format_to!(message, "- {err}\n"); + } + } } if !self.config.cargo_autoreload() && self.is_quiescent() diff --git a/editors/code/src/ctx.ts b/editors/code/src/ctx.ts index ac144cbebb2..72d8109bc80 100644 --- a/editors/code/src/ctx.ts +++ b/editors/code/src/ctx.ts @@ -449,7 +449,7 @@ export class Ctx { return; } if (statusBar.tooltip.value) { - statusBar.tooltip.appendText("\n\n"); + statusBar.tooltip.appendMarkdown("\n\n---\n\n"); } statusBar.tooltip.appendMarkdown("\n\n[Open logs](command:rust-analyzer.openLogs)"); statusBar.tooltip.appendMarkdown(