I'm using the C++ Extension for VSCode (Visual Studio Code).
Currently, I have the setting "C_Cpp.clang_format_formatOnSave"
set to true
.
This format's my code when I save my C++ file. But the format results in curly braces on new lines rather than on the same line.
Current C++ VSCode Formatted
for (int i = 0; i < 10; i++)
{
// ...
}
What I Want C++ VSCode Formatted Code to Look Like
for (int i = 0; i < 10; i++) {
// ...
}
I also have editor.wrappingIndent
set to "same"
.
How can I make curly braces in C++ format on the same line in Visual Studio Code?