Skip to content

Commit

Permalink
Use the warning color when rust-analyzer is stopped
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Wilfred committed Aug 4, 2023
1 parent c59bd2d commit 253d684
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions editors/code/src/ctx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -442,8 +442,10 @@ export class Ctx {
statusBar.tooltip.appendMarkdown(
"\n\n[Start server](command:rust-analyzer.startServer)",
);
statusBar.color = undefined;
statusBar.backgroundColor = undefined;
statusBar.color = new vscode.ThemeColor("statusBarItem.warningForeground");
statusBar.backgroundColor = new vscode.ThemeColor(
"statusBarItem.warningBackground",
);
statusBar.command = "rust-analyzer.startServer";
statusBar.text = `$(stop-circle) rust-analyzer`;
return;
Expand Down

0 comments on commit 253d684

Please sign in to comment.