Skip to content

Commit 253d684

Browse files
committed
Use the warning color when rust-analyzer is stopped
If the rust-analyzer server isn't running, we can't do much. Treat this state as a warning color, so it's more obvious.
1 parent c59bd2d commit 253d684

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

editors/code/src/ctx.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -442,8 +442,10 @@ export class Ctx {
442442
statusBar.tooltip.appendMarkdown(
443443
"\n\n[Start server](command:rust-analyzer.startServer)",
444444
);
445-
statusBar.color = undefined;
446-
statusBar.backgroundColor = undefined;
445+
statusBar.color = new vscode.ThemeColor("statusBarItem.warningForeground");
446+
statusBar.backgroundColor = new vscode.ThemeColor(
447+
"statusBarItem.warningBackground",
448+
);
447449
statusBar.command = "rust-analyzer.startServer";
448450
statusBar.text = `$(stop-circle) rust-analyzer`;
449451
return;

0 commit comments

Comments
 (0)