# Documents: https://clang.llvm.org/docs/ClangFormatStyleOptions.html Language: Cpp # BasedOnStyle: LLVM AccessModifierOffset: -4 AlignAfterOpenBracket: Align AlignConsecutiveAssignments: false AlignConsecutiveDeclarations: false AlignEscapedNewlinesLeft: true AlignOperands: Align AlwaysBreakTemplateDeclarations : true AlignTrailingComments: true AllowAllArgumentsOnNextLine : true AllowAllParametersOfDeclarationOnNextLine: true AllowShortBlocksOnASingleLine : true AllowShortCaseLabelsOnASingleLine: false AllowShortFunctionsOnASingleLine: Inline AllowShortIfStatementsOnASingleLine: false AllowShortLoopsOnASingleLine: false AllowShortFunctionsOnASingleLine: false AllowShortLambdasOnASingleLine: true AllowShortEnumsOnASingleLine: false AlwaysBreakAfterDefinitionReturnType: None BinPackArguments: true BinPackParameters: true ConstructorInitializerIndentWidth: 0 ConstructorInitializerAllOnOneLineOrOnePerLine: true ColumnLimit: 0 CommentPragmas: '^ IWYU pragma:' PointerAlignment: Left IndentWidth: 4 SortIncludes: false MaxEmptyLinesToKeep: 2 SpacesInSquareBrackets: false SpacesInParentheses : false SpaceBeforeAssignmentOperators: true SpacesInContainerLiterals: true IndentWrappedFunctionNames: true KeepEmptyLinesAtTheStartOfBlocks: true BreakConstructorInitializersBeforeComma: true SpaceAfterCStyleCast: false IndentCaseLabels: true TabWidth: 4 UseTab: Never BreakBeforeBraces: Custom BraceWrapping: # case 语句后面 AfterCaseLabel: false # class定义后面 AfterClass: false # 控制语句后面 AfterControlStatement: false # enum定义后面 AfterEnum: false # 函数定义后面 AfterFunction: false # 命名空间定义后面 AfterNamespace: false # struct定义后面 AfterStruct: false # union定义后面 AfterUnion: false # extern导出块后面 AfterExternBlock: false # catch之前 BeforeCatch: false # else之前 BeforeElse: false # 缩进大括号(整个大括号框起来的部分都缩进) IndentBraces: false # 空函数的大括号是否可以在一行 SplitEmptyFunction: true # 空记录体(struct/class/union)的大括号是否可以在一行 SplitEmptyRecord: true # 空namespace的大括号是否可以在一行 SplitEmptyNamespace: true