diff options
Diffstat (limited to 'editors/code/src/commands')
-rw-r--r-- | editors/code/src/commands/syntaxTree.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editors/code/src/commands/syntaxTree.ts b/editors/code/src/commands/syntaxTree.ts index 7200ae823..2f50fe14b 100644 --- a/editors/code/src/commands/syntaxTree.ts +++ b/editors/code/src/commands/syntaxTree.ts | |||
@@ -5,7 +5,7 @@ import { Server } from '../server'; | |||
5 | 5 | ||
6 | export const syntaxTreeUri = vscode.Uri.parse('rust-analyzer://syntaxtree'); | 6 | export const syntaxTreeUri = vscode.Uri.parse('rust-analyzer://syntaxtree'); |
7 | 7 | ||
8 | export class TextDocumentContentProvider | 8 | export class SyntaxTreeContentProvider |
9 | implements vscode.TextDocumentContentProvider { | 9 | implements vscode.TextDocumentContentProvider { |
10 | public eventEmitter = new vscode.EventEmitter<vscode.Uri>(); | 10 | public eventEmitter = new vscode.EventEmitter<vscode.Uri>(); |
11 | public syntaxTree: string = 'Not available'; | 11 | public syntaxTree: string = 'Not available'; |
@@ -54,7 +54,7 @@ type SyntaxTreeResult = string; | |||
54 | // Opens the virtual file that will show the syntax tree | 54 | // Opens the virtual file that will show the syntax tree |
55 | // | 55 | // |
56 | // The contents of the file come from the `TextDocumentContentProvider` | 56 | // The contents of the file come from the `TextDocumentContentProvider` |
57 | export function createHandle(provider: TextDocumentContentProvider) { | 57 | export function createHandle(provider: SyntaxTreeContentProvider) { |
58 | return async () => { | 58 | return async () => { |
59 | const editor = vscode.window.activeTextEditor; | 59 | const editor = vscode.window.activeTextEditor; |
60 | const rangeEnabled = !!(editor && !editor.selection.isEmpty); | 60 | const rangeEnabled = !!(editor && !editor.selection.isEmpty); |