Skip to content
This repository was archived by the owner on Nov 18, 2022. It is now read-only.

Commit 30694bd

Browse files
committed
Remove generic prefix from status bar spinner
1 parent dd1ec79 commit 30694bd

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

src/extension.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ function whenOpeningTextDocument(document: TextDocument) {
106106
folder = nearestParentWorkspace(folder, document.uri.fsPath);
107107

108108
if (!folder) {
109-
stopSpinner(`RLS: Cargo.toml missing`);
109+
stopSpinner(`Cargo.toml missing`);
110110
return;
111111
}
112112

@@ -172,7 +172,7 @@ class ClientWorkspace {
172172
}
173173

174174
public async start() {
175-
startSpinner('RLS', 'Starting');
175+
startSpinner('Starting');
176176

177177
const serverOptions: ServerOptions = async () => {
178178
await this.autoUpdate();
@@ -273,7 +273,7 @@ class ClientWorkspace {
273273

274274
const runningProgress: Set<string> = new Set();
275275
await this.lc.onReady();
276-
stopSpinner('RLS');
276+
stopSpinner();
277277

278278
this.lc.onNotification(
279279
new NotificationType<ProgressParams, void>('window/progress'),
@@ -292,9 +292,9 @@ class ClientWorkspace {
292292
} else if (progress.title) {
293293
status = `[${progress.title.toLowerCase()}]`;
294294
}
295-
startSpinner('RLS', status);
295+
startSpinner(status);
296296
} else {
297-
stopSpinner('RLS');
297+
stopSpinner();
298298
}
299299
},
300300
);

src/rustup.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export interface RustupConfig {
2121
}
2222

2323
export async function rustupUpdate(config: RustupConfig) {
24-
startSpinner('RLS', 'Updating…');
24+
startSpinner('Updating…');
2525

2626
try {
2727
const { stdout } = await withWsl(config.useWSL).exec(
@@ -103,7 +103,7 @@ async function hasToolchain(config: RustupConfig): Promise<boolean> {
103103
}
104104

105105
async function tryToInstallToolchain(config: RustupConfig) {
106-
startSpinner('RLS', 'Installing toolchain…');
106+
startSpinner('Installing toolchain…');
107107
try {
108108
const { command, args } = withWsl(config.useWSL).modifyArgs(config.path, [
109109
'toolchain',
@@ -154,7 +154,7 @@ async function hasRlsComponents(config: RustupConfig): Promise<boolean> {
154154
}
155155

156156
async function installRlsComponents(config: RustupConfig) {
157-
startSpinner('RLS', 'Installing components…');
157+
startSpinner('Installing components…');
158158

159159
for (const component of REQUIRED_COMPONENTS) {
160160
try {

src/spinner.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { window } from 'vscode';
22

3-
export function startSpinner(prefix: string, postfix: string) {
4-
window.setStatusBarMessage(`${prefix} $(settings-gear~spin) ${postfix}`);
3+
export function startSpinner(message: string) {
4+
window.setStatusBarMessage(`RLS $(settings-gear~spin) ${message}`);
55
}
66

7-
export function stopSpinner(message: string) {
8-
window.setStatusBarMessage(message);
7+
export function stopSpinner(message?: string) {
8+
window.setStatusBarMessage(`RLS ${message || ''}`);
99
}

0 commit comments

Comments
 (0)