Created
August 27, 2025 23:54
-
-
Save xeioex/f811092cb885b75ef27645e8bcc1fe70 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| BasedOnStyle: LLVM | |
| Language: Cpp | |
| # General layout | |
| ColumnLimit: 80 | |
| IndentWidth: 4 | |
| TabWidth: 4 | |
| UseTab: Never | |
| MaxEmptyLinesToKeep: 2 | |
| # Braces and function signatures | |
| BreakBeforeBraces: Stroustrup | |
| AllowShortFunctionsOnASingleLine: None | |
| AlwaysBreakAfterReturnType: TopLevelDefinitions | |
| AllowShortIfStatementsOnASingleLine: false | |
| AllowShortLoopsOnASingleLine: false | |
| AllowShortBlocksOnASingleLine: false | |
| AllowShortCaseLabelsOnASingleLine: false | |
| # Prefer breaking before non-assignment binary operators (e.g. ||, &&) | |
| BreakBeforeBinaryOperators: NonAssignment | |
| BreakBeforeTernaryOperators: true | |
| # Calls, parameters, and alignment | |
| AlignAfterOpenBracket: DontAlign | |
| BinPackArguments: true | |
| BinPackParameters: true | |
| ContinuationIndentWidth: 4 | |
| Cpp11BracedListStyle: false | |
| # Spaces around tokens | |
| SpaceAfterCStyleCast: true | |
| SpacesInParentheses: false | |
| SpaceInEmptyParentheses: false | |
| SpacesInSquareBrackets: false | |
| SpaceBeforeSquareBrackets: false | |
| SpacesInAngles: Never | |
| SpaceBeforeAssignmentOperators: true | |
| # No space after function names; space after control keywords | |
| SpaceBeforeParens: ControlStatements | |
| # Granular control for newer clang-format versions (ignored by older ones) | |
| SpaceBeforeParensOptions: | |
| AfterControlStatements: true | |
| AfterForeachMacros: true | |
| AfterFunctionDeclarationName: false | |
| AfterFunctionDefinitionName: false | |
| #AfterFunctionCallName: false | |
| AfterIfMacros: true | |
| AfterOverloadedOperator: false | |
| BeforeNonEmptyParentheses: false | |
| # Pointer style: type + space + *name | |
| PointerAlignment: Right | |
| DerivePointerAlignment: false | |
| # switch/case and labels | |
| IndentCaseLabels: false # case labels align with 'switch' | |
| IndentGotoLabels: false # labels at column 0 | |
| #LabelIndent: 0 | |
| # Declarations and comments | |
| AlignConsecutiveDeclarations: false | |
| AlignConsecutiveAssignments: false | |
| AlignTrailingComments: true | |
| SpacesBeforeTrailingComments: 2 | |
| ReflowComments: true | |
| BreakStringLiterals: true | |
| # Includes and preprocessor | |
| SortIncludes: false | |
| IncludeBlocks: Preserve | |
| IndentPPDirectives: None | |
| PPIndentWidth: 0 | |
| # Line endings | |
| UseCRLF: false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment