BasedOnStyle: Google AlignAfterOpenBracket: AlwaysBreak AlignConsecutiveAssignments: 'false' AlignConsecutiveDeclarations: 'false' AlignEscapedNewlinesLeft: 'true' AlignOperands: 'false' AlignTrailingComments: 'true' AllowShortBlocksOnASingleLine: 'false' AllowShortCaseLabelsOnASingleLine: 'false' AllowShortFunctionsOnASingleLine: None AllowShortIfStatementsOnASingleLine: 'false' AllowShortLoopsOnASingleLine: 'false' ColumnLimit: 120 KeepEmptyLinesAtTheStartOfBlocks: 'false' NamespaceIndentation: All PenaltyBreakString: '3' SortIncludes: CaseInsensitive SpaceBeforeParens: ControlStatements SpacesInAngles: 'false' SpacesInContainerLiterals: 'false' SpacesInParentheses: 'false' SpacesInSquareBrackets: 'false' Standard: Cpp11 UseTab: Never # bracing BraceWrapping: AfterCaseLabel: true AfterClass: true AfterControlStatement: true AfterEnum: true AfterFunction: true AfterNamespace: true AfterObjCDeclaration: true AfterStruct: true AfterUnion: true AfterExternBlock: true BeforeCatch: true BeforeElse: true SplitEmptyFunction: false SplitEmptyRecord: false SplitEmptyNamespace: false # breaking AlwaysBreakAfterDefinitionReturnType: None AlwaysBreakAfterReturnType: None AlwaysBreakTemplateDeclarations: 'true' BreakBeforeBinaryOperators: NonAssignment BreakBeforeBraces: Custom BreakBeforeTernaryOperators: 'true' BreakConstructorInitializers: BeforeColon # indent width IndentWidth: 4 ConstructorInitializerIndentWidth: 4 ContinuationIndentWidth: 4 # treat pointers and reference declarations as if part of the type DerivePointerAlignment: false PointerAlignment: Left # when wrapping function calls/declarations, force each parameter to have its own line PackConstructorInitializers: NextLine BinPackParameters: 'false' BinPackArguments: 'false' # Include block sorting in the following order: # - Main header for source file (clang-format default prioritizes this first) # - Relative path includes in quotation marks # - Absolute path includes in angle brackets # - External dependencies # - System dependencies IncludeBlocks: Regroup IncludeCategories: - Regex: '".+\.h' Priority: 2 - Regex: '^' Priority: 4 - Regex: '' Priority: 5 - Regex: '^<.*\.h(pp)?>$' Priority: 6 - Regex: '(<)(.)+(>)' Priority: 7