rust-analyzer
rust-analyzer copied to clipboard
Using `rust-analyzer` with worktrees causes file watcher to watch every worktree
When I use rust-analyzer
within a repo that uses git worktrees, one directory for each branch, r-a watches all the directories within the repo. Then runs many cargo
instances (this is a Rust repo). This chokes my whole system.
Is it possible to configure the file watcher to more finely?
FTR I have ~ 90 worktrees in the repo at the moment.
Thanks
could this help?
https://github.com/rust-lang/rust-analyzer/blob/543d7e98dbcc0668528dbf3f5b32d752882baa33/editors/code/package.json#L952-L959
Thanks for the response, I considered excluding directories but then I would have to manually un-exclude the ones I'm "working" on for some definition of working on. What I really want is all the git worktree directories to be excluded unless there is a file within them open i.e., opening any file in a git worktree directory causes RA to start processing all files in that particular git wortkree.