Skip to content

Instantly share code, notes, and snippets.

@TonyDecvA180XN
Created April 24, 2024 08:43
Show Gist options
  • Select an option

  • Save TonyDecvA180XN/4231b3a3a667654fe34fff1903a8afed to your computer and use it in GitHub Desktop.

Select an option

Save TonyDecvA180XN/4231b3a3a667654fe34fff1903a8afed to your computer and use it in GitHub Desktop.
Language: Cpp
Standard: c++20
BasedOnStyle: Microsoft
ColumnLimit: 150
LineEnding: CRLF
# Indentation
AccessModifierOffset: -4
ContinuationIndentWidth: 4
IndentAccessModifiers: false
IndentCaseBlocks: false
IndentCaseLabels: false
IndentExternBlock: AfterExternBlock
IndentPPDirectives: BeforeHash
IndentWidth: 4
IndentWrappedFunctionNames: false
LambdaBodyIndentation: Signature
NamespaceIndentation: All
TabWidth: 4
UseTab: ForContinuationAndIndentation
# Alignment
AlignAfterOpenBracket: AlwaysBreak
AlignArrayOfStructures: Left
AlignConsecutiveAssignments: false
AlignConsecutiveBitFields: false
AlignConsecutiveDeclarations: false
AlignConsecutiveMacros: false
AlignConsecutiveShortCaseStatements:
Enabled: true
AlignEscapedNewlines: Right
AlignOperands: Align
AlignTrailingComments:
Kind: Never
PointerAlignment: Left
QualifierAlignment: Left
ReferenceAlignment: Pointer
# Breaks
AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: true
AllowShortEnumsOnASingleLine: true
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: false
AlwaysBreakBeforeMultilineStrings: true
BinPackArguments: false
BinPackParameters: false
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeBraces: Allman
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: AfterColon
BreakInheritanceList: AfterColon
BreakStringLiterals: true
CompactNamespaces: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
InsertNewlineAtEOF: true
PackConstructorInitializers: CurrentLine
SeparateDefinitionBlocks: Always
ShortNamespaceLines: 0
# Spacing
BitFieldColonSpacing: Both
Cpp11BracedListStyle: true
KeepEmptyLinesAtEOF: false
KeepEmptyLinesAtTheStartOfBlocks: false
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceAroundPointerQualifiers: Default
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: Never
SpacesInLineCommentPrefix:
Minimum: 0
Maximum: -1
SpacesInParens: Never
SpacesInSquareBrackets: false
# Other
FixNamespaceComments: true
IncludeBlocks: Regroup
InsertBraces: false
RemoveBracesLLVM: false
RemoveParentheses: ReturnStatement
RemoveSemicolon: true
SortIncludes: CaseSensitive
SortUsingDeclarations: LexicographicNumeric
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment