File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -541,15 +541,13 @@ export class LanguageClientManager {
541
541
) ;
542
542
} ,
543
543
handleWorkDoneProgress : ( ( ) => {
544
- let restoringLSPStarted = false ;
544
+ let hasPrompted = false ;
545
545
return async ( token , params , next ) => {
546
546
const result = await next ( token , params ) ;
547
- const title = ( params as langclient . WorkDoneProgressBegin ) . title ;
548
- if ( title === "SourceKit-LSP: Restoring functionality" ) {
549
- restoringLSPStarted = true ;
550
- } else if ( params . kind === "end" && restoringLSPStarted ) {
551
- restoringLSPStarted = false ;
552
- await promptForDiagnostics ( this . workspaceContext ) ;
547
+ if ( ! hasPrompted && token . toString ( ) . startsWith ( "sourcekitd-crashed" ) ) {
548
+ // Only prompt once in case sourcekit is in a crash loop
549
+ hasPrompted = true ;
550
+ promptForDiagnostics ( this . workspaceContext ) ;
553
551
}
554
552
return result ;
555
553
} ;
You can’t perform that action at this time.
0 commit comments