Auto merge of #12388 - Veykril:statusitem, r=Veykril

internal: Make use of the statusBarItem colors in VSCode

Fixes https://github.com/rust-lang/rust-analyzer/issues/7736
This commit is contained in:
bors 2022-05-26 10:31:23 +00:00
commit 92f363059a

View file

@ -86,13 +86,19 @@ export class Ctx {
case "warning":
this.statusBar.tooltip += "\nClick to reload.";
this.statusBar.command = "rust-analyzer.reloadWorkspace";
this.statusBar.color = new vscode.ThemeColor("notificationsWarningIcon.foreground");
this.statusBar.color = new vscode.ThemeColor("statusBarItem.warningForeground");
this.statusBar.backgroundColor = new vscode.ThemeColor(
"statusBarItem.warningBackground"
);
icon = "$(warning) ";
break;
case "error":
this.statusBar.tooltip += "\nClick to reload.";
this.statusBar.command = "rust-analyzer.reloadWorkspace";
this.statusBar.color = new vscode.ThemeColor("notificationsErrorIcon.foreground");
this.statusBar.color = new vscode.ThemeColor("statusBarItem.errorForeground");
this.statusBar.backgroundColor = new vscode.ThemeColor(
"statusBarItem.errorBackground"
);
icon = "$(error) ";
break;
}