# Based on SumatraPDF style
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
# Easy way to check some of the flags: https://clangformat.com/
BasedOnStyle: Chromium
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: WithoutElse
AllowShortLoopsOnASingleLine: true

# Prevents collapsing even short enums to one line
AllowShortEnumsOnASingleLine: false

# Aligns the enumerators vertically after the {
AlignAfterOpenBracket: Align
IndentWidth: 4
ColumnLimit: 120
AccessModifierOffset: -2
PointerAlignment: Left
SpacesBeforeTrailingComments: 1
BinPackParameters: true
Cpp11BracedListStyle: true
SortIncludes: false
# AlignArrayOfStructures: Left

Language: Cpp
Standard: c++17

# # Indentation
# IndentWidth: 4
# TabWidth: 4
# UseTab: Never
# ContinuationIndentWidth: 4

# # Braces
# BreakBeforeBraces: Attach
# BraceWrapping:
#   AfterCaseLabel: false
#   AfterClass: false
#   AfterControlStatement: Never
#   AfterEnum: false
#   AfterFunction: false
#   AfterNamespace: false
#   AfterStruct: false
#   AfterUnion: false
#   BeforeCatch: false
#   BeforeElse: false
#   IndentBraces: false
#   SplitEmptyFunction: false
#   SplitEmptyRecord: false

# # Pointer/Reference alignment
# PointerAlignment: Left
# ReferenceAlignment: Left

# # Line width
# ColumnLimit: 120

# # Spaces
# SpaceAfterCStyleCast: false
# SpaceBeforeAssignmentOperators: true
# SpaceBeforeCpp11BracedList: true
# SpaceBeforeCtorInitializerColon: true
# SpaceBeforeParens: ControlStatements
# SpaceBeforeRangeBasedForLoopColon: true
# SpaceInEmptyParentheses: false
# SpacesInAngles: Never
# SpacesInCStyleCastParentheses: false
# SpacesInContainerLiterals: false
# SpacesInParentheses: false
# SpacesInSquareBrackets: false

# # Alignment
# AlignAfterOpenBracket: Align
# AlignConsecutiveAssignments: false
# AlignConsecutiveDeclarations: false
# AlignEscapedNewlines: Left
# AlignOperands: Align
# AlignTrailingComments: true

# # Short statements
# AllowShortBlocksOnASingleLine: Empty
# AllowShortCaseLabelsOnASingleLine: false
# AllowShortFunctionsOnASingleLine: Inline
# AllowShortIfStatementsOnASingleLine: WithoutElse
# AllowShortLoopsOnASingleLine: true

# # Breaking
# AlwaysBreakAfterReturnType: None
# AlwaysBreakBeforeMultilineStrings: false
# BinPackArguments: true
# BinPackParameters: true
# BreakBeforeBinaryOperators: None
# BreakBeforeTernaryOperators: true
# BreakStringLiterals: true

# # Switch/Case
# IndentCaseLabels: true
# IndentCaseBlocks: false

# # Includes
# IncludeBlocks: Preserve
# SortIncludes: Never

# # Other
# Cpp11BracedListStyle: true
# DerivePointerAlignment: false
# FixNamespaceComments: true
# IndentPPDirectives: None
# KeepEmptyLinesAtTheStartOfBlocks: false
# MaxEmptyLinesToKeep: 1
# ReflowComments: true

# # Language
# Language: Cpp
# Standard: c++17
