draconisplusplus/.clang-format
2025-04-27 19:18:07 -04:00

40 lines
1.1 KiB
YAML

BasedOnStyle: Chromium
AlignAfterOpenBracket: BlockIndent
AlignArrayOfStructures: Right
AlignConsecutiveAssignments:
Enabled: true
AlignConsecutiveDeclarations:
Enabled: true
PadOperators: true
AlignConsecutiveMacros:
Enabled: true
AlignConsecutiveShortCaseStatements:
Enabled: true
AlignOperands: DontAlign
AllowShortBlocksOnASingleLine: Always
AllowShortCaseLabelsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
AllowShortLoopsOnASingleLine: true
BinPackArguments: false
ColumnLimit: 120
ConstructorInitializerIndentWidth: 2
ContinuationIndentWidth: 2
Cpp11BracedListStyle: false
IncludeBlocks: Regroup
IncludeCategories:
# 1. System headers (<iostream>, <vector>, etc.)
- Regex: '^<.*>$'
Priority: 1
# 2. Project headers starting with "src/"
- Regex: '^"src/.*"'
Priority: 2
# 3. All other quoted headers (including same-directory like "system_data.h")
# This acts as a fallback for quoted includes not matching the above.
- Regex: '^".*"'
Priority: 3
IndentExternBlock: Indent
IndentPPDirectives: BeforeHash
NamespaceIndentation: All
QualifierAlignment: Left
SpaceBeforeCpp11BracedList: true
SpacesBeforeTrailingComments: 1