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(
239
239
let ( config, e, _) = config. apply_change ( change) ;
240
240
this. config_errors = e. is_empty ( ) . not ( ) . then_some ( e) ;
241
241
242
- // Client config changes neccesitates .update_config method to be called.
242
+ // Client config changes necessitates .update_config method to be called.
243
243
this. update_configuration ( config) ;
244
244
}
245
245
}
Original file line number Diff line number Diff line change @@ -114,6 +114,16 @@ impl GlobalState {
114
114
Durability :: HIGH ,
115
115
) ;
116
116
}
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
+ }
117
127
}
118
128
119
129
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 {
20
20
configureLang : vscode . Disposable | undefined ;
21
21
22
22
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
+ ) ;
32
26
33
27
private readonly requiresWindowReloadOpts = [ "testExplorer" ] . map (
34
28
( opt ) => `${ this . rootSection } .${ opt } ` ,
@@ -208,7 +202,7 @@ export class Config {
208
202
}
209
203
210
204
get serverPath ( ) {
211
- return this . get < null | string > ( "server.path" ) ?? this . get < null | string > ( "serverPath" ) ;
205
+ return this . get < null | string > ( "server.path" ) ;
212
206
}
213
207
214
208
get serverExtraEnv ( ) : Env {
You can’t perform that action at this time.
0 commit comments