mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 21:43:37 +00:00
Auto merge of #12093 - nico-abram:uwu, r=Veykril
Reload project on .cargo/config[.toml] changes Fixes #11024 Not adding tests as discussed in the issue
This commit is contained in:
commit
9e10d4b717
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