This repository was archived by the owner on Nov 18, 2022. It is now read-only.
File tree 3 files changed +10
-9
lines changed
3 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -151,7 +151,7 @@ function startLanguageClient(context: ExtensionContext)
151
151
}
152
152
warnOnMissingCargoToml ( ) ;
153
153
154
- startSpinner ( 'RLS starting ' ) ;
154
+ startSpinner ( 'RLS' , 'Starting ') ;
155
155
156
156
warnOnRlsToml ( ) ;
157
157
// Check for deprecated env vars.
@@ -222,10 +222,11 @@ function progressCounter() {
222
222
runningProgress [ progress . id ] = true ;
223
223
}
224
224
if ( Object . keys ( runningProgress ) . length ) {
225
- const msg =
225
+ const status =
226
226
typeof progress . percentage === 'number' ? asPercent ( progress . percentage ) :
227
- progress . message ? progress . message : '' ;
228
- startSpinner ( `RLS ${ msg } ` ) ;
227
+ progress . message ? progress . message :
228
+ progress . title ? `[${ progress . title . toLowerCase ( ) } ]` : '' ;
229
+ startSpinner ( 'RLS' , status ) ;
229
230
} else {
230
231
stopSpinner ( 'RLS' ) ;
231
232
}
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ export function runRlsViaRustup(env: any): Promise<child_process.ChildProcess> {
25
25
}
26
26
27
27
export async function rustupUpdate ( ) {
28
- startSpinner ( 'Updating RLS... ' ) ;
28
+ startSpinner ( 'RLS' , 'Updating… ') ;
29
29
30
30
try {
31
31
const { stdout } = await execChildProcess ( CONFIGURATION . rustupPath + ' update' ) ;
@@ -74,7 +74,7 @@ async function hasToolchain(): Promise<boolean> {
74
74
}
75
75
76
76
async function tryToInstallToolchain ( ) : Promise < void > {
77
- startSpinner ( 'Installing toolchain... ' ) ;
77
+ startSpinner ( 'RLS' , ' Installing toolchain… ') ;
78
78
try {
79
79
const { stdout, stderr } = await execChildProcess ( CONFIGURATION . rustupPath + ' toolchain install ' + CONFIGURATION . channel ) ;
80
80
console . log ( stdout ) ;
@@ -129,7 +129,7 @@ async function hasRlsComponents(): Promise<boolean> {
129
129
}
130
130
131
131
async function installRls ( ) : Promise < void > {
132
- startSpinner ( 'Installing RLS components' ) ;
132
+ startSpinner ( 'RLS' , 'Installing components') ;
133
133
134
134
const tryFn : ( component : string ) => Promise < ( Error | null ) > = async ( component : string ) => {
135
135
try {
Original file line number Diff line number Diff line change 12
12
13
13
import { window } from 'vscode' ;
14
14
15
- export function startSpinner ( message : string ) {
15
+ export function startSpinner ( prefix : string , postfix : string ) {
16
16
if ( spinnerTimer != null ) {
17
17
clearInterval ( spinnerTimer ) ;
18
18
}
19
19
let state = 0 ;
20
20
spinnerTimer = setInterval ( function ( ) {
21
- window . setStatusBarMessage ( message + ' ' + spinner [ state ] ) ;
21
+ window . setStatusBarMessage ( prefix + ' ' + spinner [ state ] + ' ' + postfix ) ;
22
22
state = ( state + 1 ) % spinner . length ;
23
23
} , 100 ) ;
24
24
}
You can’t perform that action at this time.
0 commit comments