mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
internal: remove client-side support for latest requests
Companion for #9826
This commit is contained in:
parent
ce8400bbfd
commit
bb8607434d
1 changed files with 5 additions and 14 deletions
|
@ -35,8 +35,6 @@ export function analyzerStatus(ctx: Ctx): Cmd {
|
||||||
}
|
}
|
||||||
}();
|
}();
|
||||||
|
|
||||||
let poller: NodeJS.Timer | undefined = undefined;
|
|
||||||
|
|
||||||
ctx.pushCleanup(
|
ctx.pushCleanup(
|
||||||
vscode.workspace.registerTextDocumentContentProvider(
|
vscode.workspace.registerTextDocumentContentProvider(
|
||||||
'rust-analyzer-status',
|
'rust-analyzer-status',
|
||||||
|
@ -44,20 +42,13 @@ export function analyzerStatus(ctx: Ctx): Cmd {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
ctx.pushCleanup({
|
|
||||||
dispose() {
|
|
||||||
if (poller !== undefined) {
|
|
||||||
clearInterval(poller);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
return async () => {
|
return async () => {
|
||||||
if (poller === undefined) {
|
|
||||||
poller = setInterval(() => tdcp.eventEmitter.fire(tdcp.uri), 1000);
|
|
||||||
}
|
|
||||||
const document = await vscode.workspace.openTextDocument(tdcp.uri);
|
const document = await vscode.workspace.openTextDocument(tdcp.uri);
|
||||||
return vscode.window.showTextDocument(document, vscode.ViewColumn.Two, true);
|
tdcp.eventEmitter.fire(tdcp.uri);
|
||||||
|
void await vscode.window.showTextDocument(document, {
|
||||||
|
viewColumn: vscode.ViewColumn.Two,
|
||||||
|
preserveFocus: true
|
||||||
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue