File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -333,6 +333,11 @@ export class SessionManager {
333333 connectFunc ,
334334 clientOptions ) ;
335335
336+ // Send the new LanguageClient to extension features
337+ // so that they can register their message handlers
338+ // before the connection is established.
339+ this . updateExtensionFeatures ( this . languageServerClient ) ;
340+
336341 this . languageServerClient . onReady ( ) . then (
337342 ( ) => {
338343 this . languageServerClient
@@ -345,19 +350,19 @@ export class SessionManager {
345350 ? `${ this . versionDetails . displayVersion } (${ this . versionDetails . architecture } )`
346351 : this . versionDetails . displayVersion ,
347352 SessionStatus . Running ) ;
348-
349- this . updateExtensionFeatures ( this . languageServerClient )
350353 } ) ;
351354 } ,
352355 ( reason ) => {
353356 this . setSessionFailure ( "Could not start language service: " , reason ) ;
357+ this . updateExtensionFeatures ( undefined ) ;
354358 } ) ;
355359
356360 this . languageServerClient . start ( ) ;
357361 }
358362 catch ( e )
359363 {
360364 this . setSessionFailure ( "The language service could not be started: " , e ) ;
365+ this . updateExtensionFeatures ( undefined ) ;
361366 }
362367 }
363368
You can’t perform that action at this time.
0 commit comments