aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/events
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code/src/events')
-rw-r--r--editors/code/src/events/change_text_document.ts10
1 files changed, 4 insertions, 6 deletions
diff --git a/editors/code/src/events/change_text_document.ts b/editors/code/src/events/change_text_document.ts
index 6be057245..89488bc61 100644
--- a/editors/code/src/events/change_text_document.ts
+++ b/editors/code/src/events/change_text_document.ts
@@ -1,20 +1,18 @@
1import * as vscode from 'vscode'; 1import * as vscode from 'vscode';
2 2
3import { 3import {
4 syntaxTreeUri, 4 SyntaxTreeContentProvider,
5 TextDocumentContentProvider 5 syntaxTreeUri
6} from '../commands/syntaxTree'; 6} from '../commands/syntaxTree';
7 7
8export function createHandler( 8export function createHandler(syntaxTreeProvider: SyntaxTreeContentProvider) {
9 textDocumentContentProvider: TextDocumentContentProvider
10) {
11 return (event: vscode.TextDocumentChangeEvent) => { 9 return (event: vscode.TextDocumentChangeEvent) => {
12 const doc = event.document; 10 const doc = event.document;
13 if (doc.languageId !== 'rust') { 11 if (doc.languageId !== 'rust') {
14 return; 12 return;
15 } 13 }
16 afterLs(() => { 14 afterLs(() => {
17 textDocumentContentProvider.eventEmitter.fire(syntaxTreeUri); 15 syntaxTreeProvider.eventEmitter.fire(syntaxTreeUri);
18 }); 16 });
19 }; 17 };
20} 18}