Unnamed repository; edit this file 'description' to name the repository.
-rw-r--r--crates/rust-analyzer/src/handlers/notification.rs2
-rw-r--r--crates/rust-analyzer/src/reload.rs10
-rw-r--r--editors/code/src/config.ts14
3 files changed, 15 insertions, 11 deletions
diff --git a/crates/rust-analyzer/src/handlers/notification.rs b/crates/rust-analyzer/src/handlers/notification.rs
index b7373f274f..200e972e42 100644
--- a/crates/rust-analyzer/src/handlers/notification.rs
+++ b/crates/rust-analyzer/src/handlers/notification.rs
@@ -239,7 +239,7 @@ pub(crate) fn handle_did_change_configuration(
let (config, e, _) = config.apply_change(change);
this.config_errors = e.is_empty().not().then_some(e);
- // Client config changes neccesitates .update_config method to be called.
+ // Client config changes necessitates .update_config method to be called.
this.update_configuration(config);
}
}
diff --git a/crates/rust-analyzer/src/reload.rs b/crates/rust-analyzer/src/reload.rs
index 4677880daa..189d95ec7e 100644
--- a/crates/rust-analyzer/src/reload.rs
+++ b/crates/rust-analyzer/src/reload.rs
@@ -114,6 +114,16 @@ impl GlobalState {
Durability::HIGH,
);
}
+
+ if self.config.cargo(None) != old_config.cargo(None) {
+ let req = FetchWorkspaceRequest { path: None, force_crate_graph_reload: false };
+ self.fetch_workspaces_queue.request_op("cargo config changed".to_owned(), req)
+ }
+
+ if self.config.cfg_set_test(None) != old_config.cfg_set_test(None) {
+ let req = FetchWorkspaceRequest { path: None, force_crate_graph_reload: false };
+ self.fetch_workspaces_queue.request_op("cfg_set_test config changed".to_owned(), req)
+ }
}
pub(crate) fn current_status(&self) -> lsp_ext::ServerStatusParams {
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts
index f36e18a73d..d2dc740c09 100644
--- a/editors/code/src/config.ts
+++ b/editors/code/src/config.ts
@@ -20,15 +20,9 @@ export class Config {
configureLang: vscode.Disposable | undefined;
readonly rootSection = "rust-analyzer";
- private readonly requiresServerReloadOpts = [
- "cargo",
- "procMacro",
- "serverPath",
- "server",
- "files",
- "cfg",
- "showSyntaxTree",
- ].map((opt) => `${this.rootSection}.${opt}`);
+ private readonly requiresServerReloadOpts = ["server", "files", "showSyntaxTree"].map(
+ (opt) => `${this.rootSection}.${opt}`,
+ );
private readonly requiresWindowReloadOpts = ["testExplorer"].map(
(opt) => `${this.rootSection}.${opt}`,
@@ -208,7 +202,7 @@ export class Config {
}
get serverPath() {
- return this.get<null | string>("server.path") ?? this.get<null | string>("serverPath");
+ return this.get<null | string>("server.path");
}
get serverExtraEnv(): Env {