# .clang-format
BasedOnStyle: LLVM

# Brace style
BreakBeforeBraces: Allman

# Indentation
IndentWidth: 4
TabWidth: 4
UseTab: Never
AccessModifierOffset: -4

# Line length
ColumnLimit: 80

# Allman: no short forms on single lines
AllowShortBlocksOnASingleLine: Never
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false

# Pointer alignment (common in C-style codebases)
PointerAlignment: Right

# Spacing
SpaceBeforeParens: ControlStatements
SpaceAroundPointerQualifiers: Default
SpaceBeforeAssignmentOperators: true
SpaceInEmptyParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false

# Includes
SortIncludes: CaseSensitive
IncludeBlocks: Regroup

# Line breaks
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 1
BreakBeforeBinaryOperators: None
BreakConstructorInitializers: BeforeColon

# Alignment
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignTrailingComments: true