[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 108df97: Add configuration for clang-format.
From: |
Philipp Stephani |
Subject: |
[Emacs-diffs] master 108df97: Add configuration for clang-format. |
Date: |
Sun, 24 Sep 2017 04:47:31 -0400 (EDT) |
branch: master
commit 108df97bf7d9d93f9fe976ad1e52388920076eba
Author: Philipp Stephani <address@hidden>
Commit: Philipp Stephani <address@hidden>
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.
---
.clang-format | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/.clang-format b/.clang-format
new file mode 100644
index 0000000..7895ada
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,27 @@
+Language: Cpp
+BasedOnStyle: LLVM
+AlignEscapedNewlinesLeft: true
+AlwaysBreakAfterReturnType: TopLevelDefinitions
+BreakBeforeBinaryOperators: All
+BreakBeforeBraces: GNU
+ColumnLimit: 80
+ContinuationIndentWidth: 2
+ForEachMacros: [FOR_EACH_TAIL, FOR_EACH_TAIL_SAFE]
+IncludeCategories:
+ - Regex: '^<config\.h>$'
+ Priority: -1
+ - Regex: '^<'
+ Priority: 1
+ - Regex: '^"lisp\.h"$'
+ Priority: 2
+ - Regex: '.*'
+ Priority: 3
+KeepEmptyLinesAtTheStartOfBlocks: false
+MaxEmptyLinesToKeep: 1
+PenaltyBreakBeforeFirstCallParameter: 2000
+SpaceAfterCStyleCast: true
+SpaceBeforeParens: Always
+
+# Local Variables:
+# mode: yaml
+# End:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 108df97: Add configuration for clang-format.,
Philipp Stephani <=