Fix formatting
This commit is contained in:
1 parent
2c5eecda95
commit
5b1c68337d
1 file changed
+5
-7
@@ -27,24 +27,22 @@ class WorkspaceTracker {
|
||||
}
|
||||
|
||||
private registerListeners() {
|
||||
// Create a file system watcher for all files
|
||||
const watcher = vscode.workspace.createFileSystemWatcher('**')
|
||||
const watcher = vscode.workspace.createFileSystemWatcher("**")
|
||||
|
||||
// Listen for file creation
|
||||
this.disposables.push(
|
||||
watcher.onDidCreate(async (uri) => {
|
||||
await this.addFilePath(uri.fsPath)
|
||||
this.workspaceDidUpdate()
|
||||
})
|
||||
}),
|
||||
)
|
||||
|
||||
// Listen for file deletion
|
||||
// Renaming files triggers a delete and create event
|
||||
this.disposables.push(
|
||||
watcher.onDidDelete(async (uri) => {
|
||||
if (await this.removeFilePath(uri.fsPath)) {
|
||||
this.workspaceDidUpdate()
|
||||
}
|
||||
})
|
||||
}),
|
||||
)
|
||||
|
||||
// Listen for file changes (which could include renames)
|
||||
@@ -52,7 +50,7 @@ class WorkspaceTracker {
|
||||
watcher.onDidChange(async (uri) => {
|
||||
await this.addFilePath(uri.fsPath)
|
||||
this.workspaceDidUpdate()
|
||||
})
|
||||
}),
|
||||
)
|
||||
|
||||
// Add the watcher itself to disposables
|
||||
|
||||
Reference in new issue
Block a user