Skip to content

Instantly share code, notes, and snippets.

@bernhardmgruber
Last active June 27, 2024 20:05
Show Gist options
  • Save bernhardmgruber/6576ae1cb64d6b911e112e1c929ad448 to your computer and use it in GitHub Desktop.
Save bernhardmgruber/6576ae1cb64d6b911e112e1c929ad448 to your computer and use it in GitHub Desktop.
.clang-format
# see https://clang.llvm.org/docs/ClangFormatStyleOptions.html
BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignAfterOpenBracket: DontAlign
AlignOperands: true
AlignTrailingComments: true
AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: true
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: Yes
BreakBeforeBraces: Custom
BraceWrapping:
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakStringLiterals: true
ColumnLimit: 120
FixNamespaceComments: false
IncludeBlocks: Regroup
IndentCaseLabels: true
IndentPPDirectives: AfterHash
IndentWidth: 4
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 2
NamespaceIndentation: All
PointerAlignment: Left
QualifierAlignment: Left
RemoveBracesLLVM: true
#RemoveSemicolon: true # clang-format 16
SpaceAfterTemplateKeyword: true
Standard: Latest
TabWidth: 4
UseTab: AlignWithSpaces
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment