diff options
| author | Philipp Stephani | 2017-09-19 10:48:02 +0200 |
|---|---|---|
| committer | Philipp Stephani | 2017-09-24 10:47:11 +0200 |
| commit | 108df97bf7d9d93f9fe976ad1e52388920076eba (patch) | |
| tree | e4fff0932effea2780c2b4c21757dca09b31bbd5 | |
| parent | 1eb4e5c3c8e70813c8042a38a2b67be74b16500e (diff) | |
| download | emacs-108df97bf7d9d93f9fe976ad1e52388920076eba.tar.gz emacs-108df97bf7d9d93f9fe976ad1e52388920076eba.zip | |
Add configuration for clang-format.
This allows developers to auto-format the C code with clang-format.
It’s not 100% accurate, but works pretty well for most of the C code.
| -rw-r--r-- | .clang-format | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format new file mode 100644 index 00000000000..7895ada36da --- /dev/null +++ b/.clang-format | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | Language: Cpp | ||
| 2 | BasedOnStyle: LLVM | ||
| 3 | AlignEscapedNewlinesLeft: true | ||
| 4 | AlwaysBreakAfterReturnType: TopLevelDefinitions | ||
| 5 | BreakBeforeBinaryOperators: All | ||
| 6 | BreakBeforeBraces: GNU | ||
| 7 | ColumnLimit: 80 | ||
| 8 | ContinuationIndentWidth: 2 | ||
| 9 | ForEachMacros: [FOR_EACH_TAIL, FOR_EACH_TAIL_SAFE] | ||
| 10 | IncludeCategories: | ||
| 11 | - Regex: '^<config\.h>$' | ||
| 12 | Priority: -1 | ||
| 13 | - Regex: '^<' | ||
| 14 | Priority: 1 | ||
| 15 | - Regex: '^"lisp\.h"$' | ||
| 16 | Priority: 2 | ||
| 17 | - Regex: '.*' | ||
| 18 | Priority: 3 | ||
| 19 | KeepEmptyLinesAtTheStartOfBlocks: false | ||
| 20 | MaxEmptyLinesToKeep: 1 | ||
| 21 | PenaltyBreakBeforeFirstCallParameter: 2000 | ||
| 22 | SpaceAfterCStyleCast: true | ||
| 23 | SpaceBeforeParens: Always | ||
| 24 | |||
| 25 | # Local Variables: | ||
| 26 | # mode: yaml | ||
| 27 | # End: | ||