# --- Based on Qt Coding Style --- BasedOnStyle: LLVM # --- Bracket and Indentation Behavior --- IndentWidth: 4 ConstructorInitializerIndentWidth: 4 ContinuationIndentWidth: 4 TabWidth: 4 ColumnLimit: 100 UseTab: Never AccessModifierOffset: -4 AlignAfterOpenBracket: BlockIndent AllowAllParametersOfDeclarationOnNextLine: false BinPackParameters: false BinPackArguments: false BreakBeforeBraces: Custom BreakTemplateDeclarations: Yes BreakBeforeBinaryOperators: All BraceWrapping: AfterCaseLabel: false AfterClass: true AfterStruct: true AfterControlStatement: Never AfterEnum: true AfterFunction: true AfterNamespace: true AfterUnion: true BeforeCatch: true BeforeElse: true IndentBraces: false SplitEmptyFunction: false SplitEmptyRecord: true # --- Special: Lambdas and Short Things --- AllowShortFunctionsOnASingleLine: None AllowShortBlocksOnASingleLine: Never AllowShortEnumsOnASingleLine: false AllowShortIfStatementsOnASingleLine: false AllowShortLambdasOnASingleLine: Inline AllowAllArgumentsOnNextLine: false # --- Spaces --- SpaceBeforeParens: ControlStatements SpaceAfterCStyleCast: false Cpp11BracedListStyle: true SpaceBeforeCpp11BracedList: true SpaceBeforeRangeBasedForLoopColon: true SpacesBeforeTrailingComments: 2 SpaceAfterTemplateKeyword: false SpaceBeforeInheritanceColon: false # --- Alignment & Formatting Tweaks --- AlignConsecutiveAssignments: Enabled: false AcrossEmptyLines: false AcrossComments: false AlignCompound: false AlignFunctionPointers: false PadOperators: true AlignConsecutiveDeclarations: Enabled: false AcrossEmptyLines: false AcrossComments: false AlignCompound: false AlignFunctionPointers: false PadOperators: true AlignOperands: DontAlign BreakConstructorInitializers: BeforeComma PointerAlignment: Left ReferenceAlignment: Left # --- Comment Style --- CommentPragmas: '^ IWYU pragma:' # --- Namespace handling --- NamespaceIndentation: None # --- Others --- SortIncludes: Never IncludeBlocks: Preserve MaxEmptyLinesToKeep: 2 IndentCaseLabels: true InsertBraces: true AlignEscapedNewlines: DontAlign PPIndentWidth: 1 IndentPPDirectives: AfterHash ReflowComments: true # --- Penalties (Fine-tuning when to break lines) --- PenaltyBreakAssignment: 80 PenaltyBreakBeforeFirstCallParameter: 1 PenaltyBreakComment: 60 PenaltyBreakFirstLessLess: 120 PenaltyBreakString: 1000 PenaltyBreakOpenParenthesis: 5 PenaltyExcessCharacter: 10 PenaltyReturnTypeOnItsOwnLine: 600