~ashn/setup

a24c3808031af7c919c91ebbc78514d8249ca7a2 — ashn 1 year, 8 months ago 93568c4
Add .clang-format to dotfiles

Although .clang-format is added to dotfiles it will *not* be copied
into the home directory via setup-dotfiles.sh.
Instead .clang-format should be manually copied into a project directory
when needed.
1 files changed, 64 insertions(+), 0 deletions(-)

A dotfiles/.clang-format
A dotfiles/.clang-format => dotfiles/.clang-format +64 -0
@@ 0,0 1,64 @@
AlignAfterOpenBracket: AlwaysBreak
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
# AlignConsecutiveMacros: true  <-- Not available until clang-format-9 :(
AlignEscapedNewlines: Right
AlignOperands: false
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: true
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterReturnType: TopLevel
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: true
BinPackArguments: false
BinPackParameters: false
BreakBeforeBraces: Custom
BreakConstructorInitializers: AfterColon
BreakStringLiterals: false
BraceWrapping:
  AfterClass:            true
  AfterControlStatement: true
  AfterEnum:             true
  AfterFunction:         true
  AfterNamespace:        true
  AfterStruct:           true
  AfterUnion:            true
  AfterExternBlock:      true
  BeforeCatch:           true
  BeforeElse:            true
  IndentBraces:          false
  SplitEmptyFunction:    false
  SplitEmptyRecord:      false
  SplitEmptyNamespace:   false
ColumnLimit: 80
Cpp11BracedListStyle: true
DerivePointerAlignment: false
IndentCaseLabels: false
IndentPPDirectives: AfterHash
IndentWidth: 4
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: false
Language: Cpp
MaxEmptyLinesToKeep: 1
NamespaceIndentation: Inner
PointerAlignment: Left
ReflowComments: false
SortIncludes: false
SortUsingDeclarations: false
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
UseTab: Never