Skip to content

Commit a4a062c

Browse files
committed
Try to fix high cpu usage on macos
1 parent 359442f commit a4a062c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/extension.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,13 @@ export function activate(context: ExtensionContext) {
232232
if (folders) {
233233
const ignored = config.get<string[]>("ignoredFolders", ["**/node_modules/**"]);
234234

235-
const watcher = watch(folders, { ignored, ignoreInitial: false })
235+
const watcher = watch(folders, {
236+
ignored,
237+
ignoreInitial: false,
238+
ignorePermissionErrors: true,
239+
useFsEvents: true,
240+
followSymlinks: false
241+
})
236242
.on("add", key => provider.files.add(key))
237243
.on("unlink", key => provider.files.delete(key))
238244
.on("change", key => provider.cache.delete(key));

0 commit comments

Comments
 (0)