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.
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user