Skip to content

Instantly share code, notes, and snippets.

@ccll
Created March 7, 2015 04:26
Show Gist options
  • Save ccll/7a68fc300069d73a237d to your computer and use it in GitHub Desktop.
Save ccll/7a68fc300069d73a237d to your computer and use it in GitHub Desktop.
clang-format config file
---
Language : Cpp
BasedOnStyle : LLVM
AccessModifierOffset : -2
ConstructorInitializerIndentWidth : 4
AlignEscapedNewlinesLeft : false
AlignTrailingComments : true
AllowAllParametersOfDeclarationOnNextLine : true
AllowShortBlocksOnASingleLine : false
AllowShortIfStatementsOnASingleLine : false
AllowShortLoopsOnASingleLine : false
AllowShortFunctionsOnASingleLine : All
AlwaysBreakTemplateDeclarations : false
AlwaysBreakBeforeMultilineStrings : false
BreakBeforeBinaryOperators : false
BreakBeforeTernaryOperators : true
BreakConstructorInitializersBeforeComma : false
BinPackParameters : true
ColumnLimit : 80
ConstructorInitializerAllOnOneLineOrOnePerLine : false
DerivePointerAlignment : false
ExperimentalAutoDetectBinPacking : false
IndentCaseLabels : true
IndentWrappedFunctionNames : false
IndentFunctionDeclarationAfterType : false
MaxEmptyLinesToKeep : 1
KeepEmptyLinesAtTheStartOfBlocks : true
NamespaceIndentation : None
ObjCSpaceAfterProperty : false
ObjCSpaceBeforeProtocolList : true
PenaltyBreakBeforeFirstCallParameter : 19
PenaltyBreakComment : 300
PenaltyBreakString : 1000
PenaltyBreakFirstLessLess : 120
PenaltyExcessCharacter : 1000000
PenaltyReturnTypeOnItsOwnLine : 60
PointerAlignment : Right
SpacesBeforeTrailingComments : 1
Cpp11BracedListStyle : true
Standard : Cpp11
IndentWidth : 4
TabWidth : 8
UseTab : Never
BreakBeforeBraces : Attach
SpacesInParentheses : false
SpacesInAngles : false
SpaceInEmptyParentheses : false
SpacesInCStyleCastParentheses : false
SpacesInContainerLiterals : true
SpaceBeforeAssignmentOperators : true
ContinuationIndentWidth : 4
CommentPragmas : '^ IWYU pragma:'
ForEachMacros : [ foreach, Q_FOREACH, BOOST_FOREACH ]
SpaceBeforeParens : ControlStatements
DisableFormat : false
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment