@@ -408,7 +408,7 @@ const shortMessageByStatus: StatusMap = {
408408 waiting : 'Waiting...' ,
409409 initialized : 'Fully initialized' ,
410410 initialized_but_some_missing : 'Initialized (additional servers needed)' ,
411- initializing : 'Partially initialized ' ,
411+ initializing : 'Initializing... ' ,
412412 connecting : 'Connecting...'
413413} ;
414414
@@ -540,15 +540,23 @@ export namespace LSPStatus {
540540 let initialized_documents = new Set < VirtualDocument > ( ) ;
541541 let absent_documents = new Set < VirtualDocument > ( ) ;
542542 // 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 > ( ) ;
544546
545547 detected_documents . forEach ( ( document , uri ) => {
546548 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+ }
547555 if ( ! connection ) {
548556 absent_documents . add ( document ) ;
549557 return ;
550558 } else {
551- documents_with_servers . add ( document ) ;
559+ documents_with_available_servers . add ( document ) ;
552560 }
553561
554562 if ( connection . isConnected ) {
@@ -573,9 +581,14 @@ export namespace LSPStatus {
573581 status = 'waiting' ;
574582 } else if ( initialized_documents . size === detected_documents . size ) {
575583 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+ ) {
577588 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+ ) {
579592 status = 'initializing' ;
580593 } else {
581594 status = 'connecting' ;
0 commit comments