Skip to content

Instantly share code, notes, and snippets.

@equalent
Created January 19, 2024 01:33
Show Gist options
  • Save equalent/0b21c7b81e5f2513254d56d246534c23 to your computer and use it in GitHub Desktop.
Save equalent/0b21c7b81e5f2513254d56d246534c23 to your computer and use it in GitHub Desktop.
clang-format config for RHandy's C++ style
BasedOnStyle: LLVM
IndentWidth: 8
TabWidth: 8
UseTab: Never
BreakBeforeBraces: Attach
SpaceAfterCStyleCast: true
SpacesInParentheses: false
PointerAlignment: Right
ReferenceAlignment: Right
SpacesInAngles: false
SpaceBeforeParens: ControlStatements
SpaceAroundAssignmentOperators: true
SpaceAroundRelationalOperators: true
SpaceAroundArithmeticOperators: true
SpaceAroundLogicalOperators: true
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: true
SpacesInSquareBrackets: false
SpacesBeforeTrailingComments: 1
ContinuationIndentWidth: 8
ColumnLimit: 72
MaxEmptyLinesToKeep: 0
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
IndentCaseLabels: true
AccessModifierOffset: -8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment