Files
cpp_boilerplate/.clang-format
Daniel Henry dc405f4c99 Initial Commit
Signed-off-by: Daniel Henry <iamdanhenry@gmail.com>
2025-08-26 11:48:07 -05:00

41 lines
1.1 KiB
YAML

# <project>/.clang-format
BasedOnStyle: LLVM
IndentWidth: 2
TabWidth: 2
UseTab: Never
# Stop collapsing things to one line
# AllowShortFunctionsOnASingleLine: None # or 'Empty' if you want only {} allowed
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortBlocksOnASingleLine: false
# Top-level switches
AlignTrailingComments: true # align // comments across consecutive lines
# Align declarations in neat columns
AlignConsecutiveDeclarations:
Enabled: true
AcrossEmptyLines: false
AcrossComments: false
AlignFunctionDeclarations: true # optional, aligns return types for funcs
AlignFunctionPointers: true # optional
# Align assignments too (and pad short ops so columns line up)
AlignConsecutiveAssignments:
Enabled: true
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: true # include +=, -=, etc.
PadOperators: true # only valid here
SortIncludes: true
IncludeBlocks: Merge
IncludeCategories:
- Regex: '^".*"'
Priority: 1
- Regex: '^<.*>'
Priority: 2