diff options
Diffstat (limited to 'editors/code/src/commands/analyzer_status.ts')
-rw-r--r-- | editors/code/src/commands/analyzer_status.ts | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/editors/code/src/commands/analyzer_status.ts b/editors/code/src/commands/analyzer_status.ts index 63f82c92d..9e4ce0eb3 100644 --- a/editors/code/src/commands/analyzer_status.ts +++ b/editors/code/src/commands/analyzer_status.ts | |||
@@ -9,7 +9,7 @@ export class TextDocumentContentProvider | |||
9 | public syntaxTree: string = 'Not available'; | 9 | public syntaxTree: string = 'Not available'; |
10 | 10 | ||
11 | public provideTextDocumentContent( | 11 | public provideTextDocumentContent( |
12 | uri: vscode.Uri | 12 | uri: vscode.Uri, |
13 | ): vscode.ProviderResult<string> { | 13 | ): vscode.ProviderResult<string> { |
14 | const editor = vscode.window.activeTextEditor; | 14 | const editor = vscode.window.activeTextEditor; |
15 | if (editor == null) { | 15 | if (editor == null) { |
@@ -17,7 +17,7 @@ export class TextDocumentContentProvider | |||
17 | } | 17 | } |
18 | return Server.client.sendRequest<string>( | 18 | return Server.client.sendRequest<string>( |
19 | 'rust-analyzer/analyzerStatus', | 19 | 'rust-analyzer/analyzerStatus', |
20 | null | 20 | null, |
21 | ); | 21 | ); |
22 | } | 22 | } |
23 | 23 | ||
@@ -35,8 +35,8 @@ export function makeCommand(context: vscode.ExtensionContext) { | |||
35 | context.subscriptions.push( | 35 | context.subscriptions.push( |
36 | vscode.workspace.registerTextDocumentContentProvider( | 36 | vscode.workspace.registerTextDocumentContentProvider( |
37 | 'rust-analyzer-status', | 37 | 'rust-analyzer-status', |
38 | textDocumentContentProvider | 38 | textDocumentContentProvider, |
39 | ) | 39 | ), |
40 | ); | 40 | ); |
41 | 41 | ||
42 | context.subscriptions.push({ | 42 | context.subscriptions.push({ |
@@ -44,21 +44,21 @@ export function makeCommand(context: vscode.ExtensionContext) { | |||
44 | if (poller != null) { | 44 | if (poller != null) { |
45 | clearInterval(poller); | 45 | clearInterval(poller); |
46 | } | 46 | } |
47 | } | 47 | }, |
48 | }); | 48 | }); |
49 | 49 | ||
50 | return async function handle() { | 50 | return async function handle() { |
51 | if (poller == null) { | 51 | if (poller == null) { |
52 | poller = setInterval( | 52 | poller = setInterval( |
53 | () => textDocumentContentProvider.eventEmitter.fire(statusUri), | 53 | () => textDocumentContentProvider.eventEmitter.fire(statusUri), |
54 | 1000 | 54 | 1000, |
55 | ); | 55 | ); |
56 | } | 56 | } |
57 | const document = await vscode.workspace.openTextDocument(statusUri); | 57 | const document = await vscode.workspace.openTextDocument(statusUri); |
58 | return vscode.window.showTextDocument( | 58 | return vscode.window.showTextDocument( |
59 | document, | 59 | document, |
60 | vscode.ViewColumn.Two, | 60 | vscode.ViewColumn.Two, |
61 | true | 61 | true, |
62 | ); | 62 | ); |
63 | }; | 63 | }; |
64 | } | 64 | } |