【发布时间】:2018-04-06 09:28:54
【问题描述】:
我正在使用 clang-format 4.0.0 来调整我的个人项目。 我正在为 clang-format 使用以下配置。
Language: Cpp
BreakBeforeBraces: Allman
ColumnLimit: 120
TabWidth: 4
IndentWidth: 4
UseTab: ForContinuationAndIndentation
下面的示例代码使用上面的配置对齐。
struct test
{
int a;
int b;
int c;
};
struct test T = {
.a = 1, .b = 2, .c = 3,
};
有没有办法像下面显示的那样对齐初始化部分。 基本上我正在寻找一种方法将所有初始化程序放在单独的行中。
struct test T =
{
.a = 1,
.b = 2,
.c = 3,
};
【问题讨论】:
标签: clang-format