The 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.
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.