我想配置clang格式,而不必将我的.clang-format文件复制到每个新的工作区中。
在我settings.json目前
"C_Cpp.clang_format_style": "{BasedOnStyle: Google, IndentWidth: 4, IndentCaseLabels: false, TabWidth: 4, UseTab: ForIndentation, ColumnLimit: 0}",
"C_Cpp.clang_format_fallbackStyle": "Google"
Run Code Online (Sandbox Code Playgroud)
描述了C_Cpp.clang_format_style说
编码样式,当前支持:Visual Studio,LLVM,Google,Chromium,Mozilla,WebKit。使用“文件”从当前目录或父目录中的.clang格式文件加载样式。使用“ {键:值,...}”设置特定的参数,例如:“ {BasedOnStyle:LLVM,IndentWidth:8}”
这让我认为我的方法行得通,但事实并非如此。当我使用自动格式时,它始终使用Google fallbackStyle。
这是不可能的还是我在这里做错了什么?