BasedOnStyle: LLVM
IndentWidth: 2
ColumnLimit: 100

# K&R braces for structs/classes, Allman for functions and control flow
BreakBeforeBraces: Custom
BraceWrapping:
  AfterClass: false
  AfterStruct: false
  AfterEnum: false
  AfterNamespace: false
  AfterFunction: true
  AfterControlStatement: Always
# Short one-liner methods and ifs stay on one line
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: AllIfsAndElse
AllowShortLoopsOnASingleLine: false

# Switch/case indentation
IndentCaseLabels: true

# Alignment
AlignConsecutiveAssignments: false
AlignTrailingComments: true

# Preserve blank lines between logical sections
MaxEmptyLinesToKeep: 2

# Namespace formatting
NamespaceIndentation: None
FixNamespaceComments: true

# Pointer/reference alignment
PointerAlignment: Left

# Include sorting
SortIncludes: false
