Skip to content

Commit 6c74631

Browse files
committed
Refresh diagnostics when sourcekitd has been restored
After sourcekitd has been restored, we can provide diagnostics again, so tell the editor to reload them.
1 parent f9fc58d commit 6c74631

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Sources/SourceKitLSP/Swift/SwiftLanguageService.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,9 @@ package actor SwiftLanguageService: LanguageService, Sendable {
333333
await sourceKitLSPServer.sourcekitdCrashedWorkDoneProgress.start()
334334
case (.connectionInterrupted, .connected), (.semanticFunctionalityDisabled, .connected):
335335
await sourceKitLSPServer.sourcekitdCrashedWorkDoneProgress.end()
336+
// We can provide diagnostics again now. Send a diagnostic refresh request to prompt the editor to reload
337+
// diagnostics.
338+
await refreshDiagnosticsDebouncer.scheduleCall()
336339
case (.connected, .connected),
337340
(.connectionInterrupted, .connectionInterrupted),
338341
(.connectionInterrupted, .semanticFunctionalityDisabled),

0 commit comments

Comments
 (0)