mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-04 20:54:13 +00:00
Merge #9827
9827: internal: remove client-side support for latest requests r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
commit
b2b24255c8
@ -35,8 +35,6 @@ export function analyzerStatus(ctx: Ctx): Cmd {
|
||||
}
|
||||
}();
|
||||
|
||||
let poller: NodeJS.Timer | undefined = undefined;
|
||||
|
||||
ctx.pushCleanup(
|
||||
vscode.workspace.registerTextDocumentContentProvider(
|
||||
'rust-analyzer-status',
|
||||
@ -44,20 +42,13 @@ export function analyzerStatus(ctx: Ctx): Cmd {
|
||||
),
|
||||
);
|
||||
|
||||
ctx.pushCleanup({
|
||||
dispose() {
|
||||
if (poller !== undefined) {
|
||||
clearInterval(poller);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
return async () => {
|
||||
if (poller === undefined) {
|
||||
poller = setInterval(() => tdcp.eventEmitter.fire(tdcp.uri), 1000);
|
||||
}
|
||||
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 New Issue
Block a user