@@ -132,6 +132,7 @@ const DebugProtocolNotification: NotificationType<OutputNotificationBody, void>
132132const DebugLogNotification : NotificationType < OutputNotificationBody , void > = new NotificationType < OutputNotificationBody , void > ( 'cpptools/debugLog' ) ;
133133const InactiveRegionNotification : NotificationType < InactiveRegionParams , void > = new NotificationType < InactiveRegionParams , void > ( 'cpptools/inactiveRegions' ) ;
134134const CompileCommandsPathsNotification : NotificationType < CompileCommandsPaths , void > = new NotificationType < CompileCommandsPaths , void > ( 'cpptools/compileCommandsPaths' ) ;
135+ const UpdateClangFormatPathNotification : NotificationType < string , void > = new NotificationType < string , void > ( 'cpptools/updateClangFormatPath' ) ;
135136
136137let failureMessageShown : boolean = false ;
137138
@@ -336,7 +337,7 @@ class DefaultClient implements Client {
336337 } ,
337338 workspaceFolder : workspaceFolder ,
338339 initializationOptions : {
339- clang_format_path : settings . clangFormatPath ,
340+ clang_format_path : util . resolveVariables ( settings . clangFormatPath , null ) ,
340341 clang_format_style : settings . clangFormatStyle ,
341342 clang_format_fallbackStyle : settings . clangFormatFallbackStyle ,
342343 clang_format_sortIncludes : settings . clangFormatSortIncludes ,
@@ -402,6 +403,10 @@ class DefaultClient implements Client {
402403 if ( changedSettings [ "commentContinuationPatterns" ] ) {
403404 updateLanguageConfigurations ( ) ;
404405 }
406+ if ( changedSettings [ "clang_format_path" ] ) {
407+ let settings : CppSettings = new CppSettings ( this . RootUri ) ;
408+ this . languageClient . sendNotification ( UpdateClangFormatPathNotification , util . resolveVariables ( settings . clangFormatPath , null ) ) ;
409+ }
405410 this . configuration . onDidChangeSettings ( ) ;
406411 telemetry . logLanguageServerEvent ( "CppSettingsChange" , changedSettings , null ) ;
407412 }
0 commit comments