rust-lang / rust-lang/rust-analyzer
Using `rust-analyzer` with worktrees causes file watcher to watch every worktree
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with rust-analyzer in a repository containing many Git worktrees, then observe which directories the file watcher covers and how many cargo instances are launched. Investigate the file-watching and worktree handling entry points, and consider the issue done when unrelated worktrees are excluded or can be configured without disrupting the active worktree.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, rust
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100