summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCYFS <[email protected]>2026-07-20 11:05:19 +0800
committerRbb666 <[email protected]>2026-07-22 09:28:29 +0800
commitc49320d57d324d789703d428b5fd78ca5413af4d (patch)
tree49f0bcbc0d29e9b52ce08aa25e2d0de160e04c8a
parent9657b3ce1070e1c83479f011bd09d84a922072f2 (diff)
[clang-format] Improve declaration alignment and spacing
-rw-r--r--.clang-format8
1 files changed, 5 insertions, 3 deletions
diff --git a/.clang-format b/.clang-format
index ebcac082c6..e65353af4e 100644
--- a/.clang-format
+++ b/.clang-format
@@ -10,7 +10,7 @@ AccessModifierOffset: -1
AlignAfterOpenBracket: Align
AlignArrayOfStructures: None
AlignConsecutiveAssignments:
- Enabled: false
+ Enabled: true
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: true
@@ -22,10 +22,12 @@ AlignConsecutiveBitFields:
AlignCompound: true
PadOperators: true
AlignConsecutiveDeclarations:
- Enabled: false
+ Enabled: true
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
+ AlignFunctionDeclarations: false
+ AlignFunctionPointers: true
PadOperators: false
AlignConsecutiveMacros:
Enabled: true
@@ -152,7 +154,7 @@ LambdaBodyIndentation: Signature
LineEnding: DeriveLF
MacroBlockBegin: ""
MacroBlockEnd: ""
-MaxEmptyLinesToKeep: 2
+MaxEmptyLinesToKeep: 1
NamespaceIndentation: All
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2