# requires clang 19
# https://releases.llvm.org/19.1.0/tools/clang/docs/ClangFormatStyleOptions.html

BasedOnStyle: Google
Language: Cpp
Standard: c++20
LineEnding: LF

AccessModifierOffset: -2
AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AlwaysBreakBeforeMultilineStrings: true

BinPackArguments: false
BinPackParameters: false
BreakConstructorInitializers: BeforeComma
BreakTemplateDeclarations: Yes

BreakBeforeBraces: Custom
BraceWrapping:
  AfterCaseLabel:  true
  AfterClass:      true
  AfterControlStatement: Always
  AfterEnum:       true
  AfterFunction:   true
  AfterNamespace:  true
  AfterObjCDeclaration: false
  AfterStruct:     true
  AfterUnion:      true
  AfterExternBlock: false
  BeforeCatch:     true
  BeforeElse:      true
  # BeforeLambdaBody: true   # available in clang 11
  IndentBraces:    false
  SplitEmptyFunction: false
  SplitEmptyRecord: false
  SplitEmptyNamespace: false

ConstructorInitializerIndentWidth: 2
ContinuationIndentWidth: 2
ColumnLimit: 100
PackConstructorInitializers: CurrentLine

DerivePointerAlignment: false

FixNamespaceComments: true

IndentCaseLabels: false
IndentPPDirectives: BeforeHash
IndentWidth: 2

PenaltyExcessCharacter: 10
PointerAlignment: Left

ReferenceAlignment: Left
ReflowComments: false

SortIncludes: Never
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: true
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: Never
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: true
SpacesBeforeTrailingComments: 2
SpacesInAngles: Never
SpacesInContainerLiterals: false
SpacesInParens: Never
SpacesInSquareBrackets: false

UseTab: Never

## Possible changes

# Axom defaults for alignment -- consider changing
AlignConsecutiveAssignments: None
AlignConsecutiveDeclarations: None
AlignOperands: DontAlign
