---
Language: Cpp
BasedOnStyle: Google
ColumnLimit: 150

# 大括号换行规则
BreakBeforeBraces: Custom
BraceWrapping:
  AfterClass: true
  AfterControlStatement: false
  AfterEnum: true
  AfterFunction: true
  AfterNamespace: false
  AfterObjCDeclaration: false
  AfterStruct: true
  AfterUnion: true
  BeforeCatch: false
  BeforeElse: false
  IndentBraces: false

# 空格与对齐
AlignAfterOpenBracket: Align
AlignConsecutiveMacros: true
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
AlignTrailingComments: true
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: Always
AllowShortLoopsOnASingleLine: true
BinPackArguments: true
BinPackParameters: true
BreakBeforeBinaryOperators: NonAssignment
BreakConstructorInitializers: BeforeColon
SpaceBeforeParens: ControlStatements
SpacesInAngles: Never

# 指针和引用对齐
PointerAlignment: Right
ReferenceAlignment: Right

# 函数参数换行
AllowAllParametersOfDeclarationOnNextLine: false
PenaltyBreakBeforeFirstCallParameter: 100

# 其他
SortIncludes: true
IncludeBlocks: Regroup

---
Language: Proto
BasedOnStyle: Google
ColumnLimit: 0
