---
# Based on LLVM style with modifications for your codebase
BasedOnStyle: LLVM

# Basic formatting
IndentWidth: 4
TabWidth: 4
UseTab: Never
ColumnLimit: 120

# Brace wrapping
BreakBeforeBraces: Attach
Cpp11BracedListStyle: true

# Indentation
IndentCaseLabels: true
IndentPPDirectives: BeforeHash
AccessModifierOffset: -2

# Alignment
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignOperands: true
AlignTrailingComments: true

# Spacing
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false

# Line breaks
AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false

# Includes
SortIncludes: true
IncludeBlocks: Regroup
IncludeCategories:
  - Regex:           '^<.*\.h>'
    Priority:        1
  - Regex:           '^<.*>'
    Priority:        2
  - Regex:           '.*'
    Priority:        3

# Pointers and references
DerivePointerAlignment: false
PointerAlignment: Left

# Comments (preserve your existing comment style)
ReflowComments: false

# Constructor initializers
BreakConstructorInitializers: BeforeColon
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4

# Template arguments
AlwaysBreakTemplateDeclarations: Yes

# Namespace
NamespaceIndentation: All
