This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -409,12 +409,12 @@ impl GlobalState {
409409 if self . last_reported_status . as_ref ( ) != Some ( & status) {
410410 self . last_reported_status = Some ( status. clone ( ) ) ;
411411
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-
416412 if self . config . server_status_notification ( ) {
417413 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+ }
418418 }
419419 }
420420
Original file line number Diff line number Diff line change @@ -202,7 +202,9 @@ impl GlobalState {
202202 tracing:: info!( %cause, "will switch workspaces" ) ;
203203
204204 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+ }
206208 if !self . workspaces . is_empty ( ) {
207209 // It only makes sense to switch to a partially broken workspace
208210 // if we don't have any workspace at all yet.
You can’t perform that action at this time.
0 commit comments