mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Simplify startup
This commit is contained in:
parent
dcdbbddd16
commit
d24e612106
5 changed files with 25 additions and 33 deletions
|
@ -9,11 +9,14 @@ const spinnerFrames = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '
|
|||
export function activateStatusDisplay(ctx: Ctx) {
|
||||
const statusDisplay = new StatusDisplay(ctx.config.cargoWatchOptions.command);
|
||||
ctx.pushCleanup(statusDisplay);
|
||||
ctx.onStart(client => ctx.pushCleanup(client.onProgress(
|
||||
WorkDoneProgress.type,
|
||||
'rustAnalyzer/cargoWatcher',
|
||||
params => statusDisplay.handleProgressNotification(params)
|
||||
)));
|
||||
const client = ctx.client;
|
||||
if (client != null) {
|
||||
ctx.pushCleanup(client.onProgress(
|
||||
WorkDoneProgress.type,
|
||||
'rustAnalyzer/cargoWatcher',
|
||||
params => statusDisplay.handleProgressNotification(params)
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
class StatusDisplay implements Disposable {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue