Update clang-format settings to support file: #9786
Labels
bug
Feature: Code Formatting
fixed
Check the Milestone for the release in which the fix is or will be available.
Language Service
quick fix
Milestone
Feature Request
in Clang-format v14 you can specify a file path using
-style=file:<path-to-file>
however, variable expansions do not work in setting "C_Cpp.clang_format_style"
i.e something like "C_Cpp.clang_format_style": "file:${workspaceFolder}/tools/.clang-format" is not expanded, and returns
Formatting failed:
"C:\Program Files\LLVM\bin\clang-format.exe" -style=file:${workspacefolder}/tools/.clang-format
if someone could point me to where variables like clangFormatPath are expanded i could open a PR myself,
i've already tried adding
util.resolveVariables
in client.ts mimickingsettings_clangFormatPath.push(util.resolveVariables(setting.clangFormatPath, this.AdditionalEnvironment));
however no luck.
The text was updated successfully, but these errors were encountered: