.clang-format 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. # clang-format configuration
  2. # compatible with clang-format 15
  3. UseTab: Never
  4. ColumnLimit: 100
  5. # Indent
  6. IndentWidth: 4
  7. AccessModifierOffset: -4
  8. IndentAccessModifiers: false
  9. IndentCaseLabels: true
  10. IndentGotoLabels: true
  11. IndentRequiresClause: true
  12. IndentWrappedFunctionNames: true
  13. NamespaceIndentation: None
  14. LambdaBodyIndentation: Signature
  15. BitFieldColonSpacing: Both
  16. # Insert
  17. InsertBraces: false
  18. # Align
  19. AlignAfterOpenBracket: true
  20. AlignArrayOfStructures: Left
  21. PointerAlignment: Left
  22. BreakBeforeBinaryOperators: None
  23. BreakBeforeConceptDeclarations: Always
  24. BreakBeforeTernaryOperators: true
  25. BreakConstructorInitializers: AfterColon
  26. BreakInheritanceList: AfterColon
  27. BreakStringLiterals: false
  28. CompactNamespaces: false
  29. Cpp11BracedListStyle: true
  30. EmptyLineAfterAccessModifier: Never
  31. EmptyLineBeforeAccessModifier: Always
  32. AllowAllArgumentsOnNextLine: false
  33. AllowAllParametersOfDeclarationOnNextLine: false
  34. AllowShortBlocksOnASingleLine: Always
  35. AllowShortCaseLabelsOnASingleLine: true
  36. AllowShortEnumsOnASingleLine: true
  37. AllowShortFunctionsOnASingleLine: All
  38. AllowShortIfStatementsOnASingleLine: WithoutElse
  39. AllowShortLambdasOnASingleLine: None
  40. AllowShortLoopsOnASingleLine: false
  41. AlwaysBreakAfterReturnType: None
  42. AlwaysBreakBeforeMultilineStrings: true
  43. AlwaysBreakTemplateDeclarations: Yes
  44. RequiresClausePosition: OwnLine
  45. BinPackArguments: false
  46. BinPackParameters: false
  47. # Space
  48. SeparateDefinitionBlocks: Always
  49. SpaceBeforeParens: Custom
  50. SpaceBeforeParensOptions:
  51. AfterControlStatements: false
  52. AfterForeachMacros: false
  53. AfterFunctionDeclarationName: false
  54. AfterFunctionDefinitionName: false
  55. AfterIfMacros: false
  56. AfterOverloadedOperator: true
  57. AfterRequiresInClause: true
  58. AfterRequiresInExpression: false
  59. BeforeNonEmptyParentheses: false
  60. SpaceBeforeRangeBasedForLoopColon: false
  61. SpaceBeforeSquareBrackets: false
  62. SpaceInEmptyBlock: false
  63. SpacesBeforeTrailingComments: 2
  64. SpacesInAngles: Never
  65. SpacesInSquareBrackets: false
  66. # Order
  67. QualifierAlignment: Custom
  68. QualifierOrder: ["constexpr", "const", "inline", "static", "type"]
  69. SortIncludes: Never
  70. IncludeBlocks: Merge
  71. WhitespaceSensitiveMacros: ["PK_PROTECTED", "LUA_PROTECTED"]