diff options
| author | Ville Penttinen <villem.penttinen@gmail.com> | 2019-03-03 22:03:37 +0200 |
|---|---|---|
| committer | Ville Penttinen <villem.penttinen@gmail.com> | 2019-03-03 22:03:37 +0200 |
| commit | 0db95fc812d2c839e847527b774dfda170266cec (patch) | |
| tree | 89f05d9798cf77a2798ff5fd643649cbb9071e77 /editors/code/src/extension.ts | |
| parent | 1b4e0ec1c868c7f2a0eef1e59bfa382db85a6900 (diff) | |
| download | rust-0db95fc812d2c839e847527b774dfda170266cec.tar.gz rust-0db95fc812d2c839e847527b774dfda170266cec.zip | |
Allow syntax tree to update when changing files
Previously when using the file based syntax tree, it would not update until a change had been made in the new file. Now we automatically update the syntax tree to match the current file.
Diffstat (limited to 'editors/code/src/extension.ts')
| -rw-r--r-- | editors/code/src/extension.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editors/code/src/extension.ts b/editors/code/src/extension.ts index 894334c55f7..941beba1807 100644 --- a/editors/code/src/extension.ts +++ b/editors/code/src/extension.ts @@ -94,13 +94,13 @@ export function activate(context: vscode.ExtensionContext) { notifications.publishDecorations.handle ] ]; + const syntaxTreeContentProvider = new SyntaxTreeContentProvider(); // The events below are plain old javascript events, triggered and handled by vscode vscode.window.onDidChangeActiveTextEditor( - events.changeActiveTextEditor.handle + events.changeActiveTextEditor.makeHandler(syntaxTreeContentProvider) ); - const syntaxTreeContentProvider = new SyntaxTreeContentProvider(); disposeOnDeactivation( vscode.workspace.registerTextDocumentContentProvider( 'rust-analyzer', |
