# find . -type f \( -name "*.c" -o -name "*.h" -o -name "*.cpp" -o -name "*.hpp" -o -name "*.m" -o -name "*.mm" \) -print0 | xargs -0 clang-format -i

BasedOnStyle: LLVM

UseTab: Never
IndentWidth: 4
TabWidth: 4
ContinuationIndentWidth: 4

ColumnLimit: 0
ReflowComments: true

BreakBeforeBraces: Attach
BreakBeforeCloseBracketBracedList: true
BraceWrapping:
  AfterControlStatement: false
  AfterEnum: false
  AfterFunction: false
  AfterStruct: false
  AfterUnion: false
  AfterExternBlock: false
  BeforeElse: false
  BeforeCatch: false
  SplitEmptyFunction: false
  SplitEmptyRecord: false
  SplitEmptyNamespace: false
IndentExternBlock: NoIndent

AllowShortIfStatementsOnASingleLine: AllIfsAndElse
AllowShortLoopsOnASingleLine: true
AllowShortBlocksOnASingleLine: true
AllowShortFunctionsOnASingleLine: Empty
InsertBraces: true

PointerAlignment: Left
DerivePointerAlignment: false
SpaceBeforeParens: ControlStatements
SpacesInParentheses: false
SpaceAfterCStyleCast: true
SpacesInLineCommentPrefix:
  Minimum: 1
  Maximum: 1
SpacesInContainerLiterals: true

SortIncludes: Never
IndentPPDirectives: BeforeHash
PPIndentWidth: 4

IndentCaseLabels: true

AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignOperands: DontAlign

BinPackParameters: false
BinPackArguments: false
AlignAfterOpenBracket: DontAlign
BracedInitializerIndentWidth: 4
Cpp11BracedListStyle: Block

ForEachMacros:
  - FF_LIST_FOR_EACH
  - yyjson_obj_foreach
  - yyjson_arr_foreach
  - yyjson_mut_obj_foreach
  - yyjson_mut_arr_foreach

AttributeMacros:
  - FF_A_FALLTHROUGH
  - FF_A_DEPRECATED
  - FF_A_CLEANUP
  - FF_A_NODISCARD
  - FF_A_PRINTF
  - FF_A_SCANF
  - FF_A_NONNULL
  - FF_A_RETURNS_NONNULL
  - FF_A_UNUSED
  - FF_A_PACKED
  - FF_A_WEAK_IMPORT

MaxEmptyLinesToKeep: 1
KeepEmptyLinesAtTheStartOfBlocks: false

---
Language: ObjC
ObjCBlockIndentWidth: 4
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
ObjCBreakBeforeNestedBlockParam: true
