LCD_QSPIBoot/.clang-format
2025-05-21 15:35:29 +08:00

23 lines
880 B
YAML

Language: C
BasedOnStyle: LLVM # 或 Google / WebKit / Chromium / GNU
IndentWidth: 4 # 每层缩进使用4个空格
TabWidth: 4
UseTab: Never # 或者 ForIndentation / Always
BreakBeforeBraces: Allman # 大括号换行风格,如 Allman/K&R/Stroustrup
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: InlineOnly
ColumnLimit: 100 # 最大列宽,超出会换行(可设为 0 表示不限制)
AlignAfterOpenBracket: Align # 函数参数对齐风格
PointerAlignment: Left # 指针符号 * 左对齐,如 `int* ptr` vs `int *ptr`
SpaceBeforeParens: ControlStatements # 控制语句加空格,函数调用不加空格
IndentCaseLabels: true # switch-case 中 case 分支缩进
IndentGotoLabels: true
SortIncludes: false # 是否排序 include 头文件