diff options
author | Aleksey Kladov <[email protected]> | 2019-12-31 17:14:00 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-12-31 17:32:17 +0000 |
commit | 087af54069d34eef5197e04d64ac322d9ee98085 (patch) | |
tree | 3a6e4b1884930c07bd800a771ffd777d7a866b11 /editors/code/src/commands/analyzer_status.ts | |
parent | 0849f7001cac6af93ce9e9356f8c21881bbe34c5 (diff) |
Refactor server lifecycle
Diffstat (limited to 'editors/code/src/commands/analyzer_status.ts')
-rw-r--r-- | editors/code/src/commands/analyzer_status.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/editors/code/src/commands/analyzer_status.ts b/editors/code/src/commands/analyzer_status.ts index 2c8362286..cf37dc6f0 100644 --- a/editors/code/src/commands/analyzer_status.ts +++ b/editors/code/src/commands/analyzer_status.ts | |||
@@ -49,9 +49,10 @@ class TextDocumentContentProvider | |||
49 | _uri: vscode.Uri, | 49 | _uri: vscode.Uri, |
50 | ): vscode.ProviderResult<string> { | 50 | ): vscode.ProviderResult<string> { |
51 | const editor = vscode.window.activeTextEditor; | 51 | const editor = vscode.window.activeTextEditor; |
52 | if (editor == null) return ''; | 52 | const client = this.ctx.client |
53 | if (!editor || !client) return ''; | ||
53 | 54 | ||
54 | return this.ctx.client.sendRequest<string>( | 55 | return client.sendRequest<string>( |
55 | 'rust-analyzer/analyzerStatus', | 56 | 'rust-analyzer/analyzerStatus', |
56 | null, | 57 | null, |
57 | ); | 58 | ); |