File tree Expand file tree Collapse file tree 3 files changed +15
-11
lines changed Expand file tree Collapse file tree 3 files changed +15
-11
lines changed Original file line number Diff line number Diff line change @@ -239,7 +239,7 @@ pub(crate) fn handle_did_change_configuration(
239239 let ( config, e, _) = config. apply_change ( change) ;
240240 this. config_errors = e. is_empty ( ) . not ( ) . then_some ( e) ;
241241
242- // Client config changes neccesitates .update_config method to be called.
242+ // Client config changes necessitates .update_config method to be called.
243243 this. update_configuration ( config) ;
244244 }
245245 }
Original file line number Diff line number Diff line change @@ -114,6 +114,16 @@ impl GlobalState {
114114 Durability :: HIGH ,
115115 ) ;
116116 }
117+
118+ if self . config . cargo ( None ) != old_config. cargo ( None ) {
119+ let req = FetchWorkspaceRequest { path : None , force_crate_graph_reload : false } ;
120+ self . fetch_workspaces_queue . request_op ( "cargo config changed" . to_owned ( ) , req)
121+ }
122+
123+ if self . config . cfg_set_test ( None ) != old_config. cfg_set_test ( None ) {
124+ let req = FetchWorkspaceRequest { path : None , force_crate_graph_reload : false } ;
125+ self . fetch_workspaces_queue . request_op ( "cfg_set_test config changed" . to_owned ( ) , req)
126+ }
117127 }
118128
119129 pub ( crate ) fn current_status ( & self ) -> lsp_ext:: ServerStatusParams {
Original file line number Diff line number Diff line change @@ -20,15 +20,9 @@ export class Config {
2020 configureLang : vscode . Disposable | undefined ;
2121
2222 readonly rootSection = "rust-analyzer" ;
23- private readonly requiresServerReloadOpts = [
24- "cargo" ,
25- "procMacro" ,
26- "serverPath" ,
27- "server" ,
28- "files" ,
29- "cfg" ,
30- "showSyntaxTree" ,
31- ] . map ( ( opt ) => `${ this . rootSection } .${ opt } ` ) ;
23+ private readonly requiresServerReloadOpts = [ "server" , "files" , "showSyntaxTree" ] . map (
24+ ( opt ) => `${ this . rootSection } .${ opt } ` ,
25+ ) ;
3226
3327 private readonly requiresWindowReloadOpts = [ "testExplorer" ] . map (
3428 ( opt ) => `${ this . rootSection } .${ opt } ` ,
@@ -208,7 +202,7 @@ export class Config {
208202 }
209203
210204 get serverPath ( ) {
211- return this . get < null | string > ( "server.path" ) ?? this . get < null | string > ( "serverPath" ) ;
205+ return this . get < null | string > ( "server.path" ) ;
212206 }
213207
214208 get serverExtraEnv ( ) : Env {
You can’t perform that action at this time.
0 commit comments