Last active
June 17, 2025 21:36
-
-
Save nicklasfrahm/4a4fff24381f85ada76ccb651f555e1f to your computer and use it in GitHub Desktop.
Opinionated .clang-format for JS boys coming from prettier and stumbling into C++
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
| AccessModifierOffset: 2 | |
| AlignAfterOpenBracket: true | |
| AlignConsecutiveAssignments: true | |
| AlignConsecutiveDeclarations: true | |
| AlignEscapedNewlines: Right | |
| AlignOperands: true | |
| AlignTrailingComments: true | |
| AllowAllParametersOfDeclarationOnNextLine: true | |
| AllowShortBlocksOnASingleLine: false | |
| AllowShortCaseLabelsOnASingleLine: true | |
| AllowShortFunctionsOnASingleLine: None | |
| AllowShortIfStatementsOnASingleLine: true | |
| AllowShortLoopsOnASingleLine: true | |
| AlwaysBreakAfterReturnType: None | |
| AlwaysBreakBeforeMultilineStrings: true | |
| AlwaysBreakTemplateDeclarations: false | |
| BinPackArguments: false | |
| BinPackParameters: false | |
| BreakBeforeBraces: Attach | |
| BreakBeforeInheritanceComma: false | |
| BreakBeforeTernaryOperators: true | |
| BreakStringLiterals: false | |
| ColumnLimit: 80 | |
| ConstructorInitializerAllOnOneLineOrOnePerLine: true | |
| ConstructorInitializerIndentWidth: 2 | |
| ContinuationIndentWidth: 2 | |
| CompactNamespaces: false | |
| IndentCaseLabels: true | |
| IndentWidth: 2 | |
| TabWidth: 2 | |
| UseTab: Never |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For anyone looking for the full version :