@@ -289,6 +289,7 @@ export class Ctx {
289
289
statusBar . tooltip . appendText ( status . message ?? "Ready" ) ;
290
290
statusBar . color = undefined ;
291
291
statusBar . backgroundColor = undefined ;
292
+ statusBar . command = "rust-analyzer.stopServer" ;
292
293
break ;
293
294
case "warning" :
294
295
if ( status . message ) {
@@ -298,6 +299,7 @@ export class Ctx {
298
299
statusBar . backgroundColor = new vscode . ThemeColor (
299
300
"statusBarItem.warningBackground"
300
301
) ;
302
+ statusBar . command = "rust-analyzer.openLogs" ;
301
303
icon = "$(warning) " ;
302
304
break ;
303
305
case "error" :
@@ -306,6 +308,7 @@ export class Ctx {
306
308
}
307
309
statusBar . color = new vscode . ThemeColor ( "statusBarItem.errorForeground" ) ;
308
310
statusBar . backgroundColor = new vscode . ThemeColor ( "statusBarItem.errorBackground" ) ;
311
+ statusBar . command = "rust-analyzer.openLogs" ;
309
312
icon = "$(error) " ;
310
313
break ;
311
314
case "stopped" :
@@ -315,18 +318,19 @@ export class Ctx {
315
318
) ;
316
319
statusBar . color = undefined ;
317
320
statusBar . backgroundColor = undefined ;
321
+ statusBar . command = "rust-analyzer.startServer" ;
318
322
statusBar . text = `$(stop-circle) rust-analyzer` ;
319
323
return ;
320
324
}
321
325
if ( statusBar . tooltip . value ) {
322
326
statusBar . tooltip . appendText ( "\n\n" ) ;
323
327
}
324
- statusBar . tooltip . appendMarkdown ( "[Stop server](command:rust-analyzer.stopServer)" ) ;
325
328
statusBar . tooltip . appendMarkdown (
326
329
"\n\n[Reload Workspace](command:rust-analyzer.reloadWorkspace)"
327
330
) ;
328
- statusBar . tooltip . appendMarkdown ( "\n\n[Restart server](command:rust-analyzer.startServer)" ) ;
329
331
statusBar . tooltip . appendMarkdown ( "\n\n[Open logs](command:rust-analyzer.openLogs)" ) ;
332
+ statusBar . tooltip . appendMarkdown ( "\n\n[Restart server](command:rust-analyzer.startServer)" ) ;
333
+ statusBar . tooltip . appendMarkdown ( "[Stop server](command:rust-analyzer.stopServer)" ) ;
330
334
if ( ! status . quiescent ) icon = "$(sync~spin) " ;
331
335
statusBar . text = `${ icon } rust-analyzer` ;
332
336
}
0 commit comments