We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46a4886 commit 6e144e8Copy full SHA for 6e144e8
src/providers/astProvider.ts
@@ -53,6 +53,23 @@ export class ASTProvider {
53
}
54
if (tree) {
55
forest.setTree(document.uri, true, true, tree);
56
+
57
+ // Figure out if we have files importing our changed file - update them
58
+ const urisToRefresh = [];
59
+ for (const uri in imports.imports) {
60
+ if (imports.imports.hasOwnProperty(uri)) {
61
+ const fileImports = imports.imports[uri];
62
63
+ if (fileImports.some((a) => a.fromUri === document.uri)) {
64
+ urisToRefresh.push(uri);
65
+ }
66
67
68
+ urisToRefresh.forEach((a) => {
69
+ imports.updateImports(a, forest.getTree(a)!, forest);
70
+ });
71
72
+ // Refresh imports of the calling file
73
imports.updateImports(document.uri, tree, forest);
74
75
};
0 commit comments