Skip to content

Instantly share code, notes, and snippets.

@FelixK15
Last active July 30, 2019 20:07
Show Gist options
  • Save FelixK15/3ab329a1eb8591aac51a93310791bb94 to your computer and use it in GitHub Desktop.
Save FelixK15/3ab329a1eb8591aac51a93310791bb94 to your computer and use it in GitHub Desktop.
.clang_format for private projects
# General
TabWidth: 4
Language: Cpp
BreakStringLiterals: true
PointerAlignment: Left
NamespaceIndentation: All
Cpp11BracedListStyle: false
# Spacing
SpaceAfterCStyleCast: false
SpacesInAngles: true
SpacesInCStyleCastParentheses: true
SpacesInContainerLiterals: true
SpacesInParentheses: true
SpacesInSquareBrackets: true
SpaceInEmptyParentheses: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: Never
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeRangeBasedForLoopColon: true
# Alignment
AlignConsecutiveMacros: true
AlignConsecutiveAssignments: true
AlignEscapeNewlineLeft: true
AlignTrailingComments: true
# Single line handling
AllowShortCaseLabelsOnASingleLine: true
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: None
AllowShortFunctionsOnASingleLine: None
AllowShortLoopsOnASingleLine: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment