Skip to content

Instantly share code, notes, and snippets.

@donkaban
Created August 8, 2025 10:35
Show Gist options
  • Save donkaban/16d94d5b8331fa2592f5581f57d1130e to your computer and use it in GitHub Desktop.
Save donkaban/16d94d5b8331fa2592f5581f57d1130e to your computer and use it in GitHub Desktop.
Jefe Kaban UnrealEngine formatter
Language: Cpp
Standard: c++20
DisableFormat: false
UseTab: Never
TabWidth: 4
ColumnLimit: 256
# Code Modification
InsertBraces: false
InsertTrailingCommas: None
SortIncludes: false
SortUsingDeclarations: false
# Indents
AccessModifierOffset: -4
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
IndentWidth: 4
IndentCaseBlocks: false
IndentCaseLabels: true
IndentPPDirectives: BeforeHash
IndentRequiresClause: true
IndentWrappedFunctionNames: true
LambdaBodyIndentation: Signature
NamespaceIndentation: None
# Align
AlignAfterOpenBracket: DontAlign
AlignArrayOfStructures: None
AlignConsecutiveAssignments: false
AlignConsecutiveBitFields: false
AlignConsecutiveDeclarations: false
AlignConsecutiveMacros: false
AlignEscapedNewlines: Left
AlignOperands: Align
AlignTrailingComments: false
# Spaces
Cpp11BracedListStyle: true
PointerAlignment: Left
DerivePointerAlignment: false
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: true
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: true
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: false
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: 1
SpacesInSquareBrackets: false
SpaceBeforeParens: Never
# Breaks
BreakBeforeBraces: Allman
AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: WithoutElse
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: InlineOnly
AllowShortLambdasOnASingleLine: Inline
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: false
BinPackParameters: false
BreakBeforeBinaryOperators: None
BreakBeforeTernaryOperators: true
BreakInheritanceList: BeforeComma
BreakStringLiterals: true
CompactNamespaces: true
ReflowComments: true
PenaltyReturnTypeOnItsOwnLine: 100000
# Breaks (constructor initializer)
BreakConstructorInitializers: BeforeComma
PackConstructorInitializers: CurrentLine
# Break Ternary
BreakBeforeTernaryOperators: true
BreakAfterTernaryOperators: true
# Empty Lines
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: Always
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 1
# Other
CommentPragmas: '^ IWYU pragma:'
FixNamespaceComments: false
# Unreal Engine
IncludeBlocks: Merge
IncludeCategories:
- Regex: '.*\.generated\.h'
Priority: 100
- Regex: '.*(PCH).*'
Priority: -1
- Regex: '".*"'
Priority: 1
- Regex: '^<.*\.(h)>'
Priority: 3
- Regex: '^<.*>'
Priority: 4
IncludeIsMainRegex: '([-_](test|unittest))?$'
MacroBlockBegin: ''
MacroBlockEnd: ''
StatementMacros:
- UCLASS
- USTRUCT
- UENUM
- UINTERFACE
- GENERATED_BODY
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment