mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-26 17:57:19 +00:00
Merge pull request #20020 from Veykril/push-yuqmorzsqumw
fix: Reload workspaces when cargo configs change
This commit is contained in:
commit
2b0c726e1b
3 changed files with 15 additions and 11 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue