File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -333,6 +333,11 @@ export class SessionManager {
333
333
connectFunc ,
334
334
clientOptions ) ;
335
335
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
+
336
341
this . languageServerClient . onReady ( ) . then (
337
342
( ) => {
338
343
this . languageServerClient
@@ -345,19 +350,19 @@ export class SessionManager {
345
350
? `${ this . versionDetails . displayVersion } (${ this . versionDetails . architecture } )`
346
351
: this . versionDetails . displayVersion ,
347
352
SessionStatus . Running ) ;
348
-
349
- this . updateExtensionFeatures ( this . languageServerClient )
350
353
} ) ;
351
354
} ,
352
355
( reason ) => {
353
356
this . setSessionFailure ( "Could not start language service: " , reason ) ;
357
+ this . updateExtensionFeatures ( undefined ) ;
354
358
} ) ;
355
359
356
360
this . languageServerClient . start ( ) ;
357
361
}
358
362
catch ( e )
359
363
{
360
364
this . setSessionFailure ( "The language service could not be started: " , e ) ;
365
+ this . updateExtensionFeatures ( undefined ) ;
361
366
}
362
367
}
363
368
You can’t perform that action at this time.
0 commit comments