mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
parent
198c075580
commit
b373e62f1a
4 changed files with 8 additions and 3 deletions
|
@ -67,7 +67,7 @@ config_data! {
|
|||
callInfo_full: bool = "true",
|
||||
|
||||
/// Automatically refresh project info via `cargo metadata` on
|
||||
/// `Cargo.toml` changes.
|
||||
/// `Cargo.toml` or `.cargo/config.toml` changes.
|
||||
cargo_autoreload: bool = "true",
|
||||
/// Activate all available features (`--all-features`).
|
||||
cargo_allFeatures: bool = "false",
|
||||
|
|
|
@ -617,6 +617,11 @@ pub(crate) fn should_refresh_for_change(path: &AbsPath, change_kind: ChangeKind)
|
|||
return false;
|
||||
}
|
||||
if path.extension().unwrap_or_default() != "rs" {
|
||||
if (file_name == "config.toml" || file_name == "config")
|
||||
&& path.parent().map(|parent| parent.as_ref().ends_with(".cargo")) == Some(true)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if IMPLICIT_TARGET_FILES.iter().any(|it| path.as_ref().ends_with(it)) {
|
||||
|
|
|
@ -42,7 +42,7 @@ Show function name and docs in parameter hints.
|
|||
+
|
||||
--
|
||||
Automatically refresh project info via `cargo metadata` on
|
||||
`Cargo.toml` changes.
|
||||
`Cargo.toml` or `.cargo/config.toml` changes.
|
||||
--
|
||||
[[rust-analyzer.cargo.allFeatures]]rust-analyzer.cargo.allFeatures (default: `false`)::
|
||||
+
|
||||
|
|
|
@ -439,7 +439,7 @@
|
|||
"type": "boolean"
|
||||
},
|
||||
"rust-analyzer.cargo.autoreload": {
|
||||
"markdownDescription": "Automatically refresh project info via `cargo metadata` on\n`Cargo.toml` changes.",
|
||||
"markdownDescription": "Automatically refresh project info via `cargo metadata` on\n`Cargo.toml` or `.cargo/config.toml` changes.",
|
||||
"default": true,
|
||||
"type": "boolean"
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue