---
BasedOnStyle: LLVM
ColumnLimit: 0
IndentWidth: 4
TabWidth: 4
UseTab: Never
SeparateDefinitionBlocks: Always
BreakBeforeBraces: Attach
---
Language: Cpp
SortIncludes: true
IncludeBlocks: Regroup
IncludeCategories:
  # 1. Main header corresponding to this source file (e.g., foo.h inside foo.cpp)
  - Regex: '^"(.*)\.h"'
    Priority: 0
    SortPriority: 0
  
  # 2. C Standard Library system headers (e.g., <stdlib.h>, <stdio.h>)
  - Regex: '^<.*\.(h|hpp)>'
    Priority: 1

  # 3. C++ Standard Library headers (e.g., <vector>, <string>, <iostream>)
  - Regex: '^<[^.]*>'
    Priority: 2

  # 4. Third-party library headers (e.g., <boost/thread.hpp>, <gtest/gtest.h>)
  - Regex: '^<.*'
    Priority: 3

  # 5. Internal project-specific headers (e.g., "core/renderer.h")
  - Regex: '.*'
    Priority: 4

AllowShortEnumsOnASingleLine: false
AlignConsecutiveAssignments: None
AlignConsecutiveDeclarations:
  Enabled: true
  AcrossEmptyLines: false
  AcrossComments: false
AlignArrayOfStructures: Left
InsertBraces: true
InsertNewlineAtEOF: true
AccessModifierOffset: -4
IndentCaseLabels: true
PointerAlignment: Right
AlwaysBreakTemplateDeclarations: Yes
MaxEmptyLinesToKeep: 1

# Code spacing
SpaceAfterCStyleCast: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements