File tree 2 files changed +7
-5
lines changed
2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -409,12 +409,12 @@ impl GlobalState {
409
409
if self . last_reported_status . as_ref ( ) != Some ( & status) {
410
410
self . last_reported_status = Some ( status. clone ( ) ) ;
411
411
412
- if let ( lsp_ext:: Health :: Error , Some ( message) ) = ( status. health , & status. message ) {
413
- self . show_message ( lsp_types:: MessageType :: ERROR , message. clone ( ) ) ;
414
- }
415
-
416
412
if self . config . server_status_notification ( ) {
417
413
self . send_notification :: < lsp_ext:: ServerStatusNotification > ( status) ;
414
+ } else {
415
+ if let ( lsp_ext:: Health :: Error , Some ( message) ) = ( status. health , & status. message ) {
416
+ self . show_message ( lsp_types:: MessageType :: ERROR , message. clone ( ) ) ;
417
+ }
418
418
}
419
419
}
420
420
Original file line number Diff line number Diff line change @@ -202,7 +202,9 @@ impl GlobalState {
202
202
tracing:: info!( %cause, "will switch workspaces" ) ;
203
203
204
204
if let Err ( error_message) = self . fetch_workspace_error ( ) {
205
- self . show_and_log_error ( error_message, None ) ;
205
+ if !self . config . server_status_notification ( ) {
206
+ self . show_and_log_error ( error_message, None ) ;
207
+ }
206
208
if !self . workspaces . is_empty ( ) {
207
209
// It only makes sense to switch to a partially broken workspace
208
210
// if we don't have any workspace at all yet.
You can’t perform that action at this time.
0 commit comments