9634: minor update to excludeDirs doc r=lnicola a=dae

I saw reference to globs in #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 :-)

Co-authored-by: Damien Elmes <gpg@ankiweb.net>
Co-authored-by: Damien Elmes <dae@users.noreply.github.com>
This commit is contained in:
bors[bot] 2021-07-22 11:43:05 +00:00 committed by GitHub
commit 2fbecccc71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 3 deletions

View File

@ -142,7 +142,9 @@ struct ConfigData {
/// Controls file watching implementation. /// Controls file watching implementation.
files_watcher: String = "\"client\"", files_watcher: String = "\"client\"",
/// These directories will be ignored by rust-analyzer. /// 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 `files.watcherExclude`.
files_excludeDirs: Vec<PathBuf> = "[]", files_excludeDirs: Vec<PathBuf> = "[]",
/// Use semantic tokens for strings. /// Use semantic tokens for strings.

View File

@ -204,7 +204,9 @@ Controls file watching implementation.
[[rust-analyzer.files.excludeDirs]]rust-analyzer.files.excludeDirs (default: `[]`):: [[rust-analyzer.files.excludeDirs]]rust-analyzer.files.excludeDirs (default: `[]`)::
+ +
-- --
These directories will be ignored by rust-analyzer. 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 `files.watcherExclude`.
-- --
[[rust-analyzer.highlighting.strings]]rust-analyzer.highlighting.strings (default: `true`):: [[rust-analyzer.highlighting.strings]]rust-analyzer.highlighting.strings (default: `true`)::
+ +

View File

@ -648,7 +648,7 @@
"type": "string" "type": "string"
}, },
"rust-analyzer.files.excludeDirs": { "rust-analyzer.files.excludeDirs": {
"markdownDescription": "These directories will be ignored by rust-analyzer.", "markdownDescription": "These directories will be ignored by rust-analyzer. They are\nrelative to the workspace root, and globs are not supported. You may\nalso need to add the folders to Code's `files.watcherExclude`.",
"default": [], "default": [],
"type": "array", "type": "array",
"items": { "items": {