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 {
247247 ui = getUI ( ) ;
248248 ui . bind ( this ) ;
249249
250- this . runBlockingTask ( languageClient . onReady ( ) ) . then ( ( ) => {
250+ // requests/notifications are deferred until this.languageClient is set.
251+ this . runBlockingTask ( languageClient . onReady ( ) . then ( ( ) => {
251252 this . configuration = new configs . CppProperties ( this . RootUri ) ;
252253 this . configuration . ConfigurationsChanged ( ( e ) => this . onConfigurationsChanged ( e ) ) ;
253254 this . configuration . SelectionChanged ( ( e ) => this . onSelectedConfigurationChanged ( e ) ) ;
@@ -260,7 +261,6 @@ class DefaultClient implements Client {
260261 this . configuration . CompilerDefaults = compilerDefaults ;
261262 } ) ;
262263
263- // Once this is set, we don't defer any more callbacks.
264264 this . languageClient = languageClient ;
265265 this . settingsTracker = getTracker ( this . RootUri ) ;
266266 telemetry . logLanguageServerEvent ( "NonDefaultInitialCppSettings" , this . settingsTracker . getUserModifiedSettings ( ) ) ;
@@ -275,7 +275,7 @@ class DefaultClient implements Client {
275275 failureMessageShown = true ;
276276 vscode . window . showErrorMessage ( "Unable to start the C/C++ language server. IntelliSense features will be disabled. Error: " + String ( err ) ) ;
277277 }
278- } ) ;
278+ } ) ) ;
279279 } catch ( err ) {
280280 this . isSupported = false ; // Running on an OS we don't support yet.
281281 if ( ! failureMessageShown ) {
You can’t perform that action at this time.
0 commit comments