File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Extension/src/LanguageServer Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -247,7 +247,8 @@ class DefaultClient implements Client {
247
247
ui = getUI ( ) ;
248
248
ui . bind ( this ) ;
249
249
250
- this . runBlockingTask ( languageClient . onReady ( ) ) . then ( ( ) => {
250
+ // requests/notifications are deferred until this.languageClient is set.
251
+ this . runBlockingTask ( languageClient . onReady ( ) . then ( ( ) => {
251
252
this . configuration = new configs . CppProperties ( this . RootUri ) ;
252
253
this . configuration . ConfigurationsChanged ( ( e ) => this . onConfigurationsChanged ( e ) ) ;
253
254
this . configuration . SelectionChanged ( ( e ) => this . onSelectedConfigurationChanged ( e ) ) ;
@@ -260,7 +261,6 @@ class DefaultClient implements Client {
260
261
this . configuration . CompilerDefaults = compilerDefaults ;
261
262
} ) ;
262
263
263
- // Once this is set, we don't defer any more callbacks.
264
264
this . languageClient = languageClient ;
265
265
this . settingsTracker = getTracker ( this . RootUri ) ;
266
266
telemetry . logLanguageServerEvent ( "NonDefaultInitialCppSettings" , this . settingsTracker . getUserModifiedSettings ( ) ) ;
@@ -275,7 +275,7 @@ class DefaultClient implements Client {
275
275
failureMessageShown = true ;
276
276
vscode . window . showErrorMessage ( "Unable to start the C/C++ language server. IntelliSense features will be disabled. Error: " + String ( err ) ) ;
277
277
}
278
- } ) ;
278
+ } ) ) ;
279
279
} catch ( err ) {
280
280
this . isSupported = false ; // Running on an OS we don't support yet.
281
281
if ( ! failureMessageShown ) {
You can’t perform that action at this time.
0 commit comments