File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
src/tools/rust-analyzer/crates/rust-analyzer/src Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -463,6 +463,11 @@ impl ClientCapabilities {
463463 . unwrap_or_default ( )
464464 }
465465
466+ pub fn diagnostics_refresh ( & self ) -> bool {
467+ ( || -> _ { self . 0 . workspace . as_ref ( ) ?. diagnostic . as_ref ( ) ?. refresh_support } ) ( )
468+ . unwrap_or_default ( )
469+ }
470+
466471 pub fn inlay_hint_resolve_support_properties ( & self ) -> FxHashSet < & str > {
467472 self . 0
468473 . text_document
Original file line number Diff line number Diff line change @@ -417,8 +417,6 @@ impl GlobalState {
417417 }
418418 }
419419
420- let supports_diagnostic_pull_model = self . config . text_document_diagnostic ( ) ;
421-
422420 let client_refresh = became_quiescent || state_changed;
423421 if client_refresh {
424422 // Refresh semantic tokens if the client supports it.
@@ -437,7 +435,7 @@ impl GlobalState {
437435 self . send_request :: < lsp_types:: request:: InlayHintRefreshRequest > ( ( ) , |_, _| ( ) ) ;
438436 }
439437
440- if supports_diagnostic_pull_model {
438+ if self . config . diagnostics_refresh ( ) {
441439 self . send_request :: < lsp_types:: request:: WorkspaceDiagnosticRefresh > (
442440 ( ) ,
443441 |_, _| ( ) ,
@@ -448,7 +446,7 @@ impl GlobalState {
448446 let project_or_mem_docs_changed =
449447 became_quiescent || state_changed || memdocs_added_or_removed;
450448 if project_or_mem_docs_changed
451- && !supports_diagnostic_pull_model
449+ && !self . config . text_document_diagnostic ( )
452450 && self . config . publish_diagnostics ( None )
453451 {
454452 self . update_diagnostics ( ) ;
You can’t perform that action at this time.
0 commit comments