贴一份在用的参考配置,欢迎大家讨论
BasedOnStyle: LLVM
BreakBeforeBraces: Linux
Language: Cpp
ColumnLimit: 200
ReflowComments: false
SortIncludes: false
#括号风格
BreakBeforeBraces: Custom
BraceWrapping:
AfterEnum: false
AfterStruct: false
SplitEmptyFunction: false
# 连续声明时,对齐所有声明的变量名
AlignConsecutiveDeclarations: true
# 针和引用的对齐: Left, Right, Middle
PointerAlignment: Left
# 在C风格类型转换后添加空格
SpaceAfterCStyleCast: false
# 在赋值运算符之前添加空格
SpaceBeforeAssignmentOperators: true
# 开圆括号之前添加一个空格: Never, ControlStatements, Always
SpaceBeforeParens: ControlStatements
# 在空的圆括号中添加空格
SpaceInEmptyParentheses: false
# 在尾随的评论前添加的空格数(只适用于//)
SpacesBeforeTrailingComments: 2
# 在尖括号的<后和>前添加空格
SpacesInAngles: true
# 宏赋值对齐
AlignConsecutiveMacros: true