Fix formatting

This commit is contained in:
Saoud Rizwan 2024-12-25 18:48:47 -08:00
parent 2c5eecda95
commit 5b1c68337d

View file

@ -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