mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-21 10:24:55 +00:00
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.
This commit is contained in:
parent
1eb4e5c3c8
commit
108df97bf7
27
.clang-format
Normal file
27
.clang-format
Normal file
@ -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:
|
Loading…
Reference in New Issue
Block a user