40
.clang-format
Normal file
40
.clang-format
Normal file
@@ -0,0 +1,40 @@
|
||||
# <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
|
||||
|
||||
Reference in New Issue
Block a user