Skip to content

Instantly share code, notes, and snippets.

@arnoson
Forked from nicklasfrahm/.clang-format
Last active March 16, 2023 17:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arnoson/c0e605c8746b003d2466603cf6843edd to your computer and use it in GitHub Desktop.
Save arnoson/c0e605c8746b003d2466603cf6843edd to your computer and use it in GitHub Desktop.
Prettier (JS/TS) style .clang-format options
ColumnLimit: 80
ContinuationIndentWidth: 2
IndentWidth: 2
TabWidth: 2
ConstructorInitializerIndentWidth: 2
IndentCaseLabels: true
UseTab: Never
SortIncludes: true
SortUsingDeclarations: false
AlignConsecutiveMacros: false
AlignEscapedNewlines: DontAlign
AlignAfterOpenBracket: BlockIndent
AlignOperands: false
AlignTrailingComments: false
BinPackArguments: false
BinPackParameters: false
SpacesInContainerLiterals: false
Cpp11BracedListStyle: true
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: Always
FixNamespaceComments: false
ReflowComments: false
NamespaceIndentation: All
IncludeBlocks: Merge
BreakStringLiterals: false
BreakConstructorInitializers: AfterColon
IndentPPDirectives: BeforeHash
PenaltyReturnTypeOnItsOwnLine: 200
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment