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
-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 {
463
463
. unwrap_or_default ( )
464
464
}
465
465
466
+ pub fn diagnostics_refresh ( & self ) -> bool {
467
+ ( || -> _ { self . 0 . workspace . as_ref ( ) ?. diagnostic . as_ref ( ) ?. refresh_support } ) ( )
468
+ . unwrap_or_default ( )
469
+ }
470
+
466
471
pub fn inlay_hint_resolve_support_properties ( & self ) -> FxHashSet < & str > {
467
472
self . 0
468
473
. text_document
Original file line number Diff line number Diff line change @@ -417,8 +417,6 @@ impl GlobalState {
417
417
}
418
418
}
419
419
420
- let supports_diagnostic_pull_model = self . config . text_document_diagnostic ( ) ;
421
-
422
420
let client_refresh = became_quiescent || state_changed;
423
421
if client_refresh {
424
422
// Refresh semantic tokens if the client supports it.
@@ -437,7 +435,7 @@ impl GlobalState {
437
435
self . send_request :: < lsp_types:: request:: InlayHintRefreshRequest > ( ( ) , |_, _| ( ) ) ;
438
436
}
439
437
440
- if supports_diagnostic_pull_model {
438
+ if self . config . diagnostics_refresh ( ) {
441
439
self . send_request :: < lsp_types:: request:: WorkspaceDiagnosticRefresh > (
442
440
( ) ,
443
441
|_, _| ( ) ,
@@ -448,7 +446,7 @@ impl GlobalState {
448
446
let project_or_mem_docs_changed =
449
447
became_quiescent || state_changed || memdocs_added_or_removed;
450
448
if project_or_mem_docs_changed
451
- && !supports_diagnostic_pull_model
449
+ && !self . config . text_document_diagnostic ( )
452
450
&& self . config . publish_diagnostics ( None )
453
451
{
454
452
self . update_diagnostics ( ) ;
You can’t perform that action at this time.
0 commit comments