File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -283,6 +283,9 @@ async fn update_config(
283
283
client : & tower_lsp:: Client ,
284
284
state : & mut WorldState ,
285
285
) -> anyhow:: Result < ( ) > {
286
+ // Keep track of existing config to detect whether it was changed
287
+ let diagnostics_config = state. config . diagnostics . clone ( ) ;
288
+
286
289
// Build the configuration request for global and document settings
287
290
let mut items: Vec < _ > = vec ! [ ] ;
288
291
@@ -349,6 +352,12 @@ async fn update_config(
349
352
}
350
353
}
351
354
355
+ // Refresh diagnostics if the configuration changed
356
+ if state. config . diagnostics != diagnostics_config {
357
+ tracing:: info!( "Refreshing diagnostics after configuration changed" ) ;
358
+ lsp:: spawn_diagnostics_refresh_all ( state. clone ( ) ) ;
359
+ }
360
+
352
361
Ok ( ( ) )
353
362
}
354
363
You can’t perform that action at this time.
0 commit comments