We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7009e5a commit 1ee8fefCopy full SHA for 1ee8fef
crates/rust-analyzer/src/config.rs
@@ -694,7 +694,22 @@ impl Config {
694
match self.data.linkedProjects.as_slice() {
695
[] => match self.discovered_projects.as_ref() {
696
Some(discovered_projects) => {
697
- discovered_projects.iter().cloned().map(LinkedProject::from).collect()
+ let exclude_dirs: Vec<_> = self
698
+ .data
699
+ .files_excludeDirs
700
+ .iter()
701
+ .map(|p| self.root_path.join(p))
702
+ .collect();
703
+ discovered_projects
704
705
+ .filter(|p| {
706
+ let (ProjectManifest::ProjectJson(path)
707
+ | ProjectManifest::CargoToml(path)) = p;
708
+ !exclude_dirs.iter().any(|p| path.starts_with(p))
709
+ })
710
+ .cloned()
711
+ .map(LinkedProject::from)
712
+ .collect()
713
}
714
None => Vec::new(),
715
},
0 commit comments