157 lines
7.0 KiB
YAML
157 lines
7.0 KiB
YAML
# created by asphyxia for clang-format 15.0.2 version #
|
|
# alphabetically aranged (except global options) #
|
|
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html #
|
|
|
|
# global options
|
|
DisableFormat: false
|
|
BasedOnStyle: Microsoft
|
|
Language: Cpp
|
|
Standard: c++20
|
|
|
|
# @todo: remove variables that equal defaults
|
|
|
|
AccessModifierOffset: -4
|
|
AlignAfterOpenBracket: DontAlign # @test: use false # @note: when set to 'DontAlign', dependent on 'ContinuationIndentWidth'
|
|
AlignArrayOfStructures: None
|
|
AlignConsecutiveAssignments: None
|
|
AlignConsecutiveBitFields: None
|
|
AlignConsecutiveDeclarations: None
|
|
AlignConsecutiveMacros: None
|
|
AlignEscapedNewlines: Left
|
|
AlignOperands: DontAlign # @test: use false # @note: when set to 'DontAlign', dependent on 'ContinuationIndentWidth'; when set to 'AlignAfterOperator', dependent on 'BreakBeforeBinaryOperators'
|
|
AlignTrailingComments: false
|
|
AllowAllArgumentsOnNextLine: false # @note: ignores 'BinPackArguments'
|
|
AllowAllParametersOfDeclarationOnNextLine: false # @note: ignores 'BinPackArguments'
|
|
AllowShortBlocksOnASingleLine: Empty
|
|
AllowShortCaseLabelsOnASingleLine: false
|
|
AllowShortEnumsOnASingleLine: false
|
|
AllowShortFunctionsOnASingleLine: Empty
|
|
AllowShortIfStatementsOnASingleLine: Never
|
|
AllowShortLambdasOnASingleLine: Inline
|
|
AllowShortLoopsOnASingleLine: false
|
|
AlwaysBreakAfterReturnType: None # @note: when set to 'None', dependent on 'PenaltyReturnTypeOnItsOwnLine'
|
|
AlwaysBreakBeforeMultilineStrings: false # @note: if true, dependent on 'ContinuationIndentWidth'
|
|
#AlwaysBreakTemplateDeclarations: Yes # @test: to make it work correctly with 'RequiresClausePosition' leave it unspecified # @note: when set to 'No', dependent on 'PenaltyBreakTemplateDeclaration'
|
|
#AttributeMacros: # @todo: tweak
|
|
BinPackArguments: true
|
|
BinPackParameters: true
|
|
BitFieldColonSpacing: Both
|
|
BraceWrapping:
|
|
AfterCaseLabel: true
|
|
AfterControlStatement: Always
|
|
AfterEnum: true
|
|
AfterFunction: true
|
|
AfterNamespace: true
|
|
AfterStruct: true
|
|
AfterUnion: true
|
|
AfterExternBlock: true
|
|
BeforeCatch: true
|
|
BeforeElse: true
|
|
BeforeLambdaBody: true
|
|
BeforeWhile: false
|
|
IndentBraces: false
|
|
SplitEmptyFunction: false # @note: dependent on 'AfterFunction' and 'AllowShortFunctionsOnASingleLine'
|
|
SplitEmptyRecord: false # @note: dependent on 'AfterClass'
|
|
SplitEmptyNamespace: true # @note: dependent on 'AfterNamespace'
|
|
#BreakAfterAttributes: Never # @todo: clan-format 16
|
|
#BreakArrays: false # @todo: clang-format 16 # @note: supported only for JSON
|
|
BreakBeforeBinaryOperators: None
|
|
BreakBeforeBraces: Custom # @note: when set to 'Custom', dependent on 'BraceWrapping'
|
|
BreakBeforeConceptDeclarations: Never
|
|
BreakBeforeTernaryOperators: false
|
|
BreakConstructorInitializers: AfterColon
|
|
#BreakInheritanceList: AfterComma # @note: to disable this, only leaving it unspecified works
|
|
BreakStringLiterals: false
|
|
ColumnLimit: 0
|
|
CompactNamespaces: false # @test: what if i gonna use nested namespaces like Foo::Bar?
|
|
#ConstructorInitializerIndentWidth: 0 # @test: tweak
|
|
ContinuationIndentWidth: 0
|
|
Cpp11BracedListStyle: false
|
|
DerivePointerAlignment: false # @note: if true, 'PointerAlignment' is only used as a fallback if none can be derived
|
|
EmptyLineAfterAccessModifier: Never # @note: when set to 'Leave' or 'Always', dependent on 'MaxEmptyLinesToKeep'
|
|
EmptyLineBeforeAccessModifier: LogicalBlock
|
|
FixNamespaceComments: false # @note: if true, dependent on 'ShortNamespaceLines'
|
|
IncludeBlocks: Regroup # @note: when set to 'Regroup', dependent on 'IncludeCategories'
|
|
#IncludeCategories: # @todo: tweak
|
|
#IncludeIsMainRegex: # @todo: tweak
|
|
IndentAccessModifiers: false # @note: if false, dependent on 'AccessModifierOffset'; if true, ignores 'AccessModifierOffset'
|
|
IndentCaseBlocks: false
|
|
IndentCaseLabels: false
|
|
IndentExternBlock: AfterExternBlock # @note: when set to 'AfterExternBlock', dependent on 'BraceWrapping.AfterExternBlock'
|
|
IndentGotoLabels: true
|
|
IndentPPDirectives: None
|
|
IndentRequiresClause: false # @note: if true, dependent on 'RequiresClausePosition'
|
|
IndentWidth: 4
|
|
IndentWrappedFunctionNames: true
|
|
InsertBraces: false
|
|
InsertTrailingCommas: None # @note: when set to 'Wrapped', conflicts with 'BinPackArguments'
|
|
KeepEmptyLinesAtTheStartOfBlocks: false
|
|
LambdaBodyIndentation: Signature
|
|
#LineEnding: LF # @todo: clang-format 16
|
|
MaxEmptyLinesToKeep: 1
|
|
NamespaceIndentation: All
|
|
PPIndentWidth: -1 # @note: when set to '-1', dependent on 'IndentWidth'
|
|
PackConstructorInitializers: NextLine # @todo: after clang-format 16 set this to 'NextLineOnly'
|
|
# @test: tweak
|
|
# ---
|
|
PenaltyBreakAssignment: 0
|
|
PenaltyBreakBeforeFirstCallParameter: 0
|
|
PenaltyBreakComment: 0
|
|
PenaltyBreakFirstLessLess: 0
|
|
PenaltyBreakOpenParenthesis: 0
|
|
PenaltyBreakString: 0
|
|
PenaltyBreakTemplateDeclaration: 0
|
|
PenaltyExcessCharacter: 0
|
|
PenaltyIndentedWhitespace: 0
|
|
PenaltyReturnTypeOnItsOwnLine: 0
|
|
# ---
|
|
PointerAlignment: Left
|
|
QualifierAlignment: Custom # @note: when set to 'Custom', dependent on 'QualifierOrder'; warning! setting this option to something other than 'Leave' could lead to incorrect code formatting
|
|
QualifierOrder: ['inline', 'static', 'constexpr', 'const', 'volatile', 'type', 'restrict']
|
|
ReferenceAlignment: Pointer # @note: when set to 'Pointer', dependent on 'PointerAlignment'
|
|
ReflowComments: false
|
|
#RemoveSemicolon: false # @todo: clang-format 16 # @note: warning! setting this option to true could lead to incorrect code formatting
|
|
RequiresClausePosition: WithPreceding # @test: this doesn't seem to work correctly when 'AlwaysBreakTemplateDeclarations' is set
|
|
#RequiresExpressionIndentation: OuterScope # @todo: clang-format 16
|
|
SeparateDefinitionBlocks: Always # @todo: use 'Leave'?
|
|
ShortNamespaceLines: 0
|
|
SortIncludes: Never # @test: CaseInsensitive
|
|
SortUsingDeclarations: true # @todo: after clang-format 16 change to 'Lexicographic'
|
|
SpaceAfterCStyleCast: false
|
|
SpaceAfterLogicalNot: false
|
|
SpaceAfterTemplateKeyword: true
|
|
SpaceAroundPointerQualifiers: Default # @note: when set to 'Default', dependent on 'PointerAlignment'
|
|
SpaceBeforeAssignmentOperators: true
|
|
SpaceBeforeCaseColon: false
|
|
SpaceBeforeCpp11BracedList: false
|
|
SpaceBeforeCtorInitializerColon: true
|
|
SpaceBeforeInheritanceColon: true
|
|
SpaceBeforeParens: Custom # @note: when set to 'Custom', dependent on 'SpaceBeforeParensOptions'
|
|
SpaceBeforeParensOptions:
|
|
AfterControlStatements: true
|
|
AfterForeachMacros: false
|
|
AfterFunctionDeclarationName: false
|
|
AfterIfMacros: false
|
|
AfterOverloadedOperator: false
|
|
AfterRequiresInClause: true
|
|
AfterRequiresInExpression: false
|
|
BeforeNonEmptyParentheses: false
|
|
SpaceBeforeRangeBasedForLoopColon: true
|
|
SpaceBeforeSquareBrackets: false
|
|
SpaceInEmptyBlock: true # @todo: this doesn't work for braced initilization for some reason
|
|
SpaceInEmptyParentheses: false
|
|
SpacesBeforeTrailingComments: 1 # @test: tweak
|
|
SpacesInAngles: Never
|
|
SpacesInCStyleCastParentheses: false
|
|
SpacesInConditionalStatement: false
|
|
SpacesInContainerLiterals: true
|
|
SpacesInLineCommentPrefix: # @note: dependent on 'ReflowComments'
|
|
Minimum: 1
|
|
Maximum: -1
|
|
SpacesInParentheses: false
|
|
SpacesInSquareBrackets: false
|
|
#TabWidth: # @todo: tweak or leave it as it is
|
|
UseCRLF: false # @todo: remove after clang-format 16
|
|
UseTab: Always # @todo: tweak
|
|
#WhitespaceSensitiveMacros: # @todo: tweak
|