Fix markdown link diagnostics not updated when directories are renamed / deleted (#157956)

Fix markdown link diagnostics not updated when directories are renamed/deleted

Turns our that `createFileSystemWatcher` will not fire if a parent dir is renamed / deleted. See #60813

To fix this, I believe we have to create watchers for all parent directories too (or watch everything in the entire workspace)
This commit is contained in:
Matt Bierner
2022-08-12 10:48:40 -07:00
committed by GitHub
parent 8c2fd550a3
commit 720a61fc28
4 changed files with 108 additions and 10 deletions

View File

@@ -14,7 +14,7 @@ export const fs_readFile = new RequestType<{ uri: string }, number[], any>('mark
export const fs_readDirectory = new RequestType<{ uri: string }, [string, { isDirectory: boolean }][], any>('markdown/fs/readDirectory');
export const fs_stat = new RequestType<{ uri: string }, { isDirectory: boolean } | undefined, any>('markdown/fs/stat');
export const fs_watcher_create = new RequestType<{ id: number; uri: string; options: md.FileWatcherOptions }, void, any>('markdown/fs/watcher/create');
export const fs_watcher_create = new RequestType<{ id: number; uri: string; options: md.FileWatcherOptions; watchParentDirs: boolean }, void, any>('markdown/fs/watcher/create');
export const fs_watcher_delete = new RequestType<{ id: number }, void, any>('markdown/fs/watcher/delete');
export const findMarkdownFilesInWorkspace = new RequestType<{}, string[], any>('markdown/findMarkdownFilesInWorkspace');