mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Allow rust-project.json to be hidden
This commit is contained in:
parent
b23142209e
commit
2426649661
3 changed files with 14 additions and 2 deletions
|
@ -68,6 +68,9 @@ impl ProjectManifest {
|
|||
if path.file_name().unwrap_or_default() == "rust-project.json" {
|
||||
return Ok(ProjectManifest::ProjectJson(path));
|
||||
}
|
||||
if path.file_name().unwrap_or_default() == ".rust-project.json" {
|
||||
return Ok(ProjectManifest::ProjectJson(path));
|
||||
}
|
||||
if path.file_name().unwrap_or_default() == "Cargo.toml" {
|
||||
return Ok(ProjectManifest::CargoToml(path));
|
||||
}
|
||||
|
@ -94,6 +97,9 @@ impl ProjectManifest {
|
|||
if let Some(project_json) = find_in_parent_dirs(path, "rust-project.json") {
|
||||
return Ok(vec![ProjectManifest::ProjectJson(project_json)]);
|
||||
}
|
||||
if let Some(project_json) = find_in_parent_dirs(path, ".rust-project.json") {
|
||||
return Ok(vec![ProjectManifest::ProjectJson(project_json)]);
|
||||
}
|
||||
return find_cargo_toml(path)
|
||||
.map(|paths| paths.into_iter().map(ProjectManifest::CargoToml).collect());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue