Skip to content

Instantly share code, notes, and snippets.

@KaceCottam
Created November 8, 2019 03:36
Show Gist options
  • Save KaceCottam/957e14380e7c5e9822141c5c00ea17e4 to your computer and use it in GitHub Desktop.
Save KaceCottam/957e14380e7c5e9822141c5c00ea17e4 to your computer and use it in GitHub Desktop.
My preferred clang-format
---
BasedOnStyle: Google
AlignAfterOpenBracket: AlwaysBreak
AlignConsecutiveAssignments: 'true'
AlignConsecutiveDeclarations: 'true'
AlignTrailingComments: 'true'
AllowAllParametersOfDeclarationOnNextLine: 'false'
AllowShortBlocksOnASingleLine: 'true'
AllowShortCaseLabelsOnASingleLine: 'true'
AllowShortIfStatementsOnASingleLine: 'true'
AllowShortLoopsOnASingleLine: 'true'
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: 'false'
AlwaysBreakTemplateDeclarations: 'true'
BinPackArguments: 'false'
BinPackParameters: 'false'
BreakBeforeBinaryOperators: All
BreakBeforeBraces: GNU
BreakBeforeTernaryOperators: 'true'
BreakConstructorInitializers: BeforeComma
ColumnLimit: '80'
CompactNamespaces: 'false'
ConstructorInitializerAllOnOneLineOrOnePerLine: 'false'
DerivePointerAlignment: 'false'
ExperimentalAutoDetectBinPacking: 'true'
FixNamespaceComments: 'true'
IncludeBlocks: Regroup
IndentCaseLabels: 'false'
IndentPPDirectives: None
IndentWrappedFunctionNames: 'true'
KeepEmptyLinesAtTheStartOfBlocks: 'false'
Language: Cpp
PointerAlignment: Left
ReflowComments: 'true'
SortUsingDeclarations: 'true'
SpaceAfterCStyleCast: 'true'
SpaceAfterTemplateKeyword: 'false'
SpaceBeforeAssignmentOperators: 'true'
SpaceInEmptyParentheses: 'false'
SpacesBeforeTrailingComments: '2'
SpacesInContainerLiterals: 'true'
SpacesInSquareBrackets: 'false'
...
@KaceCottam
Copy link
Author

( for c++ )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment