9 ms·
Have you checked your fs.inotify.max_user_watches value? Maybe your value is too low and Zed can't watch the files that are changing. I know the JetBrains IDEs
by nirvdrum 1mo ago
Have you checked your fs.inotify.max_user_watches value? Maybe your value is too low and Zed can't watch the files that are changing. I know the JetBrains IDEs need the default to be increased on Linux because they detected it and prompted me to increase it.
- AlotOfReading 1mo agoEven if that's the case, max_user_watches is never less than 8k unless you've set it lower for some reason. If the editor is prioritizing currently open files as it should, there should basically never be a problem even if project sync suffers.
- nirvdrum 1mo agoThe limit is per-user, not per-editor. Every process under your UID shares the same max_user_watches pool. So the editor's "prioritize open files" behavior can't help when a resident daemon like Watchman has already consumed the budget. Zed doesn't error out when it hits the watch limit. It logs a warning and periodically retries to establish the watch. Until it can do so, external file changes aren't reflected in the editor. I just checked my workstation and found Watchman alone holds ~556K watches across 34 roots. It keeps those watches even after the tool that spawned it disconnects. Notably, I've never invoked Watchman manually -- other tools do. And the 8k floor isn't much of a floor. My nixpkgs checkout alone is 37,686 directories, 4.6x that. Truthfully, I had no idea Watchman stays resident and accumulates watched roots. But, that's kind of the point. It's a very easy thing to miss.