Commit 56a074b
committed
fix: File watcher should watch directories recursively
Currently rust-analyzer only watches the directory itself, and doesn't
consider children recursively.
This is a problem when the directory itself is deleted and
recreated (e.g. if you're creating all of `mycrate/src/` with a code
generating script). The obvious solution is to configure rust-analyzer
to watch the parent directory (assuming rust-project.json), but that
requires recursive watching.
This problem probably also occurs when switching between git commits.
Instead, watch directories recursively so we can use the file watcher
with parent directories.
See also discussion on rust-lang/rust-analyzer#19907.
I've tested on some decent sized projects (several hundred transitive
dependencies) and performance seemed fine.1 parent 45efcf5 commit 56a074b
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
317 | 317 | | |
318 | 318 | | |
319 | 319 | | |
320 | | - | |
| 320 | + | |
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
| |||
0 commit comments