Skip to content

Commit b699023

Browse files
committed
minor update to excludeDirs doc
I saw reference to globs in rust-lang#7755, but it doesn't look like they're actually supported, and I had to dig through the source to discover that the folders are relative to the workspace root. Further digging was required to get VS Code from hanging for long periods trying to watch giant Bazel folders that had already been excluded from Rust Analyzer. Hopefully this tweak will save others the confusion :-)
1 parent 64bf67c commit b699023

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

crates/rust-analyzer/src/config.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,9 @@ config_data! {
142142

143143
/// Controls file watching implementation.
144144
files_watcher: String = "\"client\"",
145-
/// These directories will be ignored by rust-analyzer.
145+
/// These directories will be ignored by rust-analyzer. They are
146+
/// relative to the workspace root, and globs are not supported. You may
147+
/// also need to add the folders to Code's 'watcher exclude'.
146148
files_excludeDirs: Vec<PathBuf> = "[]",
147149

148150
/// Use semantic tokens for strings.

editors/code/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@
648648
"type": "string"
649649
},
650650
"rust-analyzer.files.excludeDirs": {
651-
"markdownDescription": "These directories will be ignored by rust-analyzer.",
651+
"markdownDescription": "These directories will be ignored by rust-analyzer. They are relative to the workspace root, and globs are not supported. You may also need to add the folders to Code's 'watcher exclude'.",
652652
"default": [],
653653
"type": "array",
654654
"items": {

0 commit comments

Comments
 (0)