In a plugin a process is launched (LSP server), which builds and modifies a lot of files.
This seems to break the native file watcher:
2026-02-10 09:48:40,056 [ 15578] WARN - #c.i.o.v.i.l.NativeFileWatcherImpl - Watcher terminated with exit code 3
2026-02-10 09:48:42,243 [ 17765] WARN - #c.i.o.v.i.l.NativeFileWatcherImpl - table error: collision at 32580 (new /home/user/test-sources/swift-openapi-generator/Examples/manual-generation-package-plugin-example/.build/index-build/x86_64-unknown-linux-gnu/debug/index/db/v13/p1496342--644b48, existing /home/user/test-sources/swift-openapi-generator/Examples/manual-generation-package-plugin-example/.build/index-build/x86_64-unknown-linux-gnu/debug/index/db/v13/saved)
Excluding all .build directories would be best, but I’m not sure how to do this.
I already have a DirectoryIndexExcludePolicy which provides all directories to exclude via getExcludeUrlsForProject, but this only seems to apply to indexing and not the file watcher.
How can I exclude directories from file watching?
Thanks!