Skip to content

Commit

Permalink
lint and format
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Murphy committed Dec 20, 2024
1 parent 0efd81f commit a19a9fc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion editors/code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3341,4 +3341,4 @@
}
]
}
}
}
9 changes: 6 additions & 3 deletions editors/code/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ export type RunnableEnvCfgItem = {
};
export type RunnableEnvCfg = Record<string, string> | RunnableEnvCfgItem[];

type ShowStatusBar = "always" | "never" | {
"documentSelector": vscode.DocumentSelector,
}
type ShowStatusBar =
| "always"
| "never"
| {
documentSelector: vscode.DocumentSelector;
};

export class Config {
readonly extensionId = "rust-lang.rust-analyzer";
Expand Down
6 changes: 2 additions & 4 deletions editors/code/src/ctx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -481,11 +481,9 @@ export class Ctx implements RustAnalyzerExtensionApi {
const showStatusBar = this.config.statusBarShowStatusBar;
if (showStatusBar == null || showStatusBar === "never") {
this.statusBar.hide();
}
else if (showStatusBar === "always") {
} else if (showStatusBar === "always") {
this.statusBar.show();
}
else {
} else {
const documentSelector = showStatusBar.documentSelector;
if (editor != null && vscode.languages.match(documentSelector, editor.document) > 0) {
this.statusBar.show();
Expand Down

0 comments on commit a19a9fc

Please sign in to comment.