Language: Cpp
# BasedOnStyle

TabWidth:          8
UseTab:            Never
IndentWidth:       2
ColumnLimit:       80
BreakBeforeBraces: Allman

IncludeCategories:
  - Regex:      '"config\.h"'
    Priority:   -10
  - Regex:      '<stddef\.h>'
    Priority:   -8
  - Regex:      '<.*>'
    Priority:   -7
  - Regex:      '".*_private\.h"'
    Priority:   -6
  - Regex:      '"mutt/.*\.h"'
    Priority:   -4
  - Regex:      '"conn/.*\.h"'
    Priority:   -3
  - Regex:      '"mutt\.h"'
    Priority:   -2
  # Main Header 0
  - Regex:      '".*"'
    Priority:   5

AlignAfterOpenBracket:            true
AlignEscapedNewlinesLeft:         false
AlignOperands:                    true
AlwaysBreakAfterReturnType:       None
BinPackArguments:                 true
BinPackParameters:                true
BreakBeforeBinaryOperators:       false
BreakBeforeTernaryOperators:      false
Cpp11BracedListStyle:             false
DerivePointerAlignment:           false
IndentCaseLabels:                 true
IndentWrappedFunctionNames:       false
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep:              1
PointerAlignment:                 Right
ReflowComments:                   false
SortIncludes:                     true
SpaceAfterCStyleCast:             true
SpaceBeforeAssignmentOperators:   true
SpaceBeforeParens:                ControlStatements
SpaceInEmptyParentheses:          false
SpacesInCStyleCastParentheses:    false
SpacesInParentheses:              false
SpacesInSquareBrackets:           false

# Allow some slightly over-long lines
PenaltyExcessCharacter: 1

# NEVER

AllowShortFunctionsOnASingleLine:    false
AllowShortBlocksOnASingleLine:       false
AllowShortCaseLabelsOnASingleLine:   false
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine:        false

# OPTIONAL

AlignTrailingComments:             true
# AlignConsecutiveAssignments:       true
# AlignConsecutiveDeclarations:      true
# AlwaysBreakBeforeMultilineStrings: true
# SpacesBeforeTrailingComments:      2
