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 @@ -149,7 +149,7 @@ function startLanguageClient(context: ExtensionContext)
149
149
}
150
150
warnOnMissingCargoToml ( ) ;
151
151
152
- startSpinner ( 'RLS starting ' ) ;
152
+ startSpinner ( 'RLS' , 'Starting ') ;
153
153
154
154
warnOnRlsToml ( ) ;
155
155
// Check for deprecated env vars.
@@ -219,10 +219,11 @@ function progressCounter() {
219
219
runningProgress [ progress . id ] = true ;
220
220
}
221
221
if ( Object . keys ( runningProgress ) . length ) {
222
- const msg =
222
+ const status =
223
223
typeof progress . percentage === 'number' ? asPercent ( progress . percentage ) :
224
- progress . message ? progress . message : '' ;
225
- startSpinner ( `RLS ${ msg } ` ) ;
224
+ progress . message ? progress . message :
225
+ progress . title ? `[${ progress . title . toLowerCase ( ) } ]` : '' ;
226
+ startSpinner ( 'RLS' , status ) ;
226
227
} else {
227
228
stopSpinner ( 'RLS' ) ;
228
229
}
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