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(
283283 client : & tower_lsp:: Client ,
284284 state : & mut WorldState ,
285285) -> anyhow:: Result < ( ) > {
286+ // Keep track of existing config to detect whether it was changed
287+ let diagnostics_config = state. config . diagnostics . clone ( ) ;
288+
286289 // Build the configuration request for global and document settings
287290 let mut items: Vec < _ > = vec ! [ ] ;
288291
@@ -349,6 +352,12 @@ async fn update_config(
349352 }
350353 }
351354
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+
352361 Ok ( ( ) )
353362}
354363
You can’t perform that action at this time.
0 commit comments