clang-format cannot apply Google format on Linux and on MacOs...
Opened this issue · 0 comments
minwang-ai commented
Here is my user setting JSON:
{
"workbench.colorTheme": "Default Dark+",
"terminal.integrated.inheritEnv": false,
"remote.SSH.connectTimeout": 60,
"security.workspace.trust.untrustedFiles": "open",
"editor.accessibilitySupport": "on",
"files.autoSave": "afterDelay",
"editor.fontSize": 24,
"[cpp]": {
"editor.defaultFormatter": "xaver.clang-format"
},
"clang-format.fallbackStyle": "Google", // Use a valid fallback like Google
"clang-format.style": "file", // Look for the .clang-format file in your project
"clang-format.executable": "/usr/local/bin/clang-format",
"C_Cpp.formatting": "clangFormat",
"C_Cpp.clang_format_fallbackStyle": "Google",
"C_Cpp.clang_format_path": "/usr/local/bin/clang-format",
"C_Cpp.clang_format_style": "file"
}
The resulting format of a simple code is always like this default format:
#include <iostream>
int main() { std::cout << "Hello world!\n"; }`
I also tried command like clang-format -style=google -i hello.cpp
However, google format should be something similar to this:
#include <iostream>
int main() {
std::cout << "Hello world!" << std::endl;
}