Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion core/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,6 @@ export class Core {
if (data?.shouldClearIndexes) {
await this.codeBaseIndexer.clearIndexes();
}

const dirs = data?.dirs ?? (await this.ide.getWorkspaceDirs());
await this.codeBaseIndexer.refreshCodebaseIndex(dirs);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ class ContinuePluginStartupActivity : StartupActivity, DumbAware {
}
})

// TODO add listeners for ModuleListener.TOPIC events

connection.subscribe(FileEditorManagerListener.FILE_EDITOR_MANAGER, object : FileEditorManagerListener {
override fun fileClosed(source: FileEditorManager, file: VirtualFile) {
Expand Down
4 changes: 2 additions & 2 deletions extensions/vscode/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions extensions/vscode/src/extension/VsCodeExtension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,21 @@ export class VsCodeExtension {
});
});

vscode.workspace.onDidChangeWorkspaceFolders(async (event) => {
const dirs = vscode.workspace.workspaceFolders?.map(
(folder) => folder.uri,
);

this.ideUtils.setWokspaceDirectories(dirs);

this.core.invoke("index/forceReIndex", {
dirs: [
...event.added.map((folder) => folder.uri.toString()),
...event.removed.map((folder) => folder.uri.toString()),
],
});
});

vscode.workspace.onDidOpenTextDocument(async (event) => {
console.log("onDidOpenTextDocument");
const ast = await getAst(event.fileName, event.getText());
Expand Down
4 changes: 4 additions & 0 deletions extensions/vscode/src/util/ideUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ export class VsCodeIdeUtils {
return this._workspaceDirectories;
}

setWokspaceDirectories(dirs: vscode.Uri[] | undefined): void {
this._workspaceDirectories = dirs;
}

getUniqueId() {
return getUniqueId();
}
Expand Down
Loading