summaryrefslogtreecommitdiff
path: root/.clang-format
blob: 67f0665b28671ff28ad4abb3e95be80c1e50c9a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# This configuration should work with Clang-Format 10 and higher.
---
Language: Cpp
BasedOnStyle: LLVM

AllowAllConstructorInitializersOnNextLine: false
AllowShortFunctionsOnASingleLine: None
AlwaysBreakAfterReturnType: AllDefinitions
AlwaysBreakBeforeMultilineStrings: true
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
  AfterClass: true
  AfterFunction: true
  AfterStruct: true
  AfterUnion: true
  SplitEmptyFunction: true
  SplitEmptyRecord: true
  SplitEmptyNamespace: true
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeBraces: Custom
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 2
ContinuationIndentWidth: 2
IncludeBlocks: Regroup
IncludeCategories:
  - Regex: '^"system.hpp"$'
    Priority: 1
  - Regex: '^["<]third_party/'
    Priority: 4
  # System headers:
  - Regex: '\.h>$'
    Priority: 5
  # C++ headers:
  - Regex: '^<[^.]+>$'
    Priority: 6
  - Regex: '^"'
    Priority: 2
  - Regex: '.*'
    Priority: 3
IndentPPDirectives: AfterHash
KeepEmptyLinesAtTheStartOfBlocks: false
PointerAlignment: Left
SpaceAfterTemplateKeyword: false
Standard: Cpp11