.clang-format 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # Raylib C Coding Style Configuration
  2. BasedOnStyle: LLVM
  3. Language: Cpp
  4. # Indentation and spacing
  5. IndentWidth: 4
  6. TabWidth: 4
  7. UseTab: Never
  8. IndentCaseLabels: false
  9. # Brace style - Allman style
  10. BraceWrapping:
  11. AfterCaseLabel: true
  12. AfterClass: true
  13. AfterControlStatement: Always
  14. AfterEnum: true
  15. AfterFunction: true
  16. AfterNamespace: true
  17. AfterStruct: true
  18. AfterUnion: true
  19. BeforeCatch: true
  20. BeforeElse: true
  21. IndentBraces: false
  22. # Line breaking and formatting
  23. ColumnLimit: 0
  24. MaxEmptyLinesToKeep: 1
  25. KeepEmptyLinesAtTheStartOfBlocks: false
  26. ReflowComments: false
  27. # Control statements
  28. AllowShortIfStatementsOnASingleLine: Never
  29. AllowShortLoopsOnASingleLine: false
  30. AllowShortFunctionsOnASingleLine: None
  31. BreakBeforeBraces: Custom
  32. # Include sorting
  33. IncludeCategories:
  34. - Regex: '^"raylib.h"'
  35. Priority: 1
  36. - Regex: '^"raymath.h"'
  37. Priority: 2
  38. - Regex: '^"rlgl.h"'
  39. Priority: 3
  40. - Regex: '^<.*'
  41. Priority: 4
  42. - Regex: '.*'
  43. Priority: 5
  44. SortIncludes: CaseSensitive
  45. # Other settings
  46. NamespaceIndentation: None
  47. AccessModifierOffset: -4
  48. IndentAccessModifiers: false
  49. AlignAfterOpenBracket: Align
  50. AlignOperands: Align
  51. SpacesInParentheses: false
  52. SpacesInSquareBrackets: false
  53. SpaceInEmptyParentheses: false