Created
May 13, 2020 07:26
-
-
Save larshei/138918717cc0ddcb6a884f3c3e21e160 to your computer and use it in GitHub Desktop.
My default config for .clang-format. Place this in e,g, the root folder of your project. May be used by e.g. Visual Code to autoformat code sections or whole files.
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
| # =========== C / Cpp ============== | |
| Language: Cpp | |
| TabWidth: 4 | |
| IndentWidth: 4 | |
| UseTab: Never | |
| AlignAfterOpenBracket: true | |
| AlignConsecutiveAssignments: true | |
| AlignConsecutiveDeclarations: true | |
| # AlignConsecutiveMacros: true # not working 'unknown key' error | |
| AlignEscapedNewlines: Left | |
| AlignOperands: true | |
| AlignTrailingComments: true | |
| PointerAlignment: Left | |
| AllowShortBlocksOnASingleLine: true | |
| AllowShortCaseLabelsOnASingleLine: true | |
| BinPackArguments: false | |
| BinPackParameters: false | |
| BreakBeforeBraces: Attach | |
| BreakBeforeTernaryOperators: true | |
| # ================================= |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment