I\'m looking for a clang-format setting to prevent the tool from removing line breaks.
For example, I have my ColumnLimit set to 120, and h
Add a comma after the last string. This tells clang-format to format it vertically. Ex: https://godbolt.org/z/bZxr__ Right click > format text
#include
#include
std::vector get_vec() {
return std::vector{
"this is a test",
"some of the lines are longer",
"than other, but I would like",
"to keep them on separate lines", // comma here after last element
};
}
int main() { auto vec = get_vec(); }