Skip to content

Commit

Permalink
clang format file
Browse files Browse the repository at this point in the history
  • Loading branch information
GlynLeine committed Feb 3, 2024
1 parent ed0694c commit a5781db
Showing 1 changed file with 75 additions and 0 deletions.
75 changes: 75 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
Language: Cpp
BasedOnStyle: LLVM

# Newlines
LineEnding: LF
InsertNewlineAtEOF: true
MaxEmptyLinesToKeep: 3
BreakBeforeBraces: Allman
BreakConstructorInitializers: AfterColon
BreakInheritanceList: AfterColon
BreakAdjacentStringLiterals: true
BreakAfterAttributes: Leave
BreakBeforeConceptDeclarations: Always

# General rules
InsertBraces: true
PointerAlignment: Left
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: None
ColumnLimit: 0
AllowShortFunctionsOnASingleLine: Inline

# Indentation: use 4 spaces for all indentation
UseTab: ForContinuationAndIndentation
TabWidth: 4
IndentWidth: 4
ContinuationIndentWidth: 4
ConstructorInitializerIndentWidth: 4
AccessModifierOffset: -4
IndentCaseLabels: true
AlwaysBreakTemplateDeclarations: Yes
IndentPPDirectives: BeforeHash
LambdaBodyIndentation: OuterScope

# namespaces
NamespaceIndentation: All
FixNamespaceComments: true
CompactNamespaces: false

# Alignment
AlignAfterOpenBracket: BlockIndent
AlignArrayOfStructures: Right
PackConstructorInitializers: Never
AlignTrailingComments:
Kind: Always
OverEmptyLines: 1
AlignEscapedNewlines: Right
AllowAllArgumentsOnNextLine: true
AllowBreakBeforeNoexceptSpecifier: true
AllowShortBlocksOnASingleLine: true
AllowBreakBeforeNoexceptSpecifier: true
AllowShortCaseLabelsOnASingleLine: true
AllowShortCompoundRequirementOnASingleLine: true
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: true
AllowShortIfStatementsOnASingleLine: true
AllowShortLambdasOnASingleLine: true
AllowShortLoopsOnASingleLine: true
AlwaysBreakTemplateDeclarations: true
BitFieldColonSpacing: Both

# includes
SortIncludes: CaseSensitive
IncludeBlocks: Preserve

# Empty lines
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: Always

# Prevent indentation on next line after these macros:
StatementMacros: [ESMeta, MetaExternal]




0 comments on commit a5781db

Please sign in to comment.