@@ -408,7 +408,7 @@ const shortMessageByStatus: StatusMap = {
408
408
waiting : 'Waiting...' ,
409
409
initialized : 'Fully initialized' ,
410
410
initialized_but_some_missing : 'Initialized (additional servers needed)' ,
411
- initializing : 'Partially initialized ' ,
411
+ initializing : 'Initializing... ' ,
412
412
connecting : 'Connecting...'
413
413
} ;
414
414
@@ -540,15 +540,23 @@ export namespace LSPStatus {
540
540
let initialized_documents = new Set < VirtualDocument > ( ) ;
541
541
let absent_documents = new Set < VirtualDocument > ( ) ;
542
542
// detected documents with LSP servers available
543
- let documents_with_servers = new Set < VirtualDocument > ( ) ;
543
+ let documents_with_available_servers = new Set < VirtualDocument > ( ) ;
544
+ // detected documents with LSP servers known
545
+ let documents_with_known_servers = new Set < VirtualDocument > ( ) ;
544
546
545
547
detected_documents . forEach ( ( document , uri ) => {
546
548
let connection = this . _connection_manager . connections . get ( uri ) ;
549
+ let server_id = this . _connection_manager . language_server_manager . getServerId (
550
+ { language : document . language }
551
+ ) ;
552
+ if ( server_id !== null ) {
553
+ documents_with_known_servers . add ( document ) ;
554
+ }
547
555
if ( ! connection ) {
548
556
absent_documents . add ( document ) ;
549
557
return ;
550
558
} else {
551
- documents_with_servers . add ( document ) ;
559
+ documents_with_available_servers . add ( document ) ;
552
560
}
553
561
554
562
if ( connection . isConnected ) {
@@ -573,9 +581,14 @@ export namespace LSPStatus {
573
581
status = 'waiting' ;
574
582
} else if ( initialized_documents . size === detected_documents . size ) {
575
583
status = 'initialized' ;
576
- } else if ( initialized_documents . size === documents_with_servers . size ) {
584
+ } else if (
585
+ initialized_documents . size === documents_with_available_servers . size &&
586
+ detected_documents . size > documents_with_known_servers . size
587
+ ) {
577
588
status = 'initialized_but_some_missing' ;
578
- } else if ( connected_documents . size === documents_with_servers . size ) {
589
+ } else if (
590
+ connected_documents . size === documents_with_available_servers . size
591
+ ) {
579
592
status = 'initializing' ;
580
593
} else {
581
594
status = 'connecting' ;
0 commit comments