- keep only the options that differ from Google style, each annotated with the Google default, so every override carries its own rationale - switch to Allman braces and a 120 column limit; short functions now collapse only when declared inline - dropped overrides fall back to Google behaviour, which turns include sorting, argument binpacking, comment reflow and namespace comment fixing back on - drop a stray trailing blank line in .clangd
12 lines
479 B
YAML
12 lines
479 B
YAML
---
|
||
Language: Cpp
|
||
BasedOnStyle: Google
|
||
|
||
# --- intentional deviations from Google C++ defaults ---
|
||
ColumnLimit: 120 # Google: 80
|
||
IndentWidth: 4 # Google: 2
|
||
TabWidth: 4 # Google/LLVM: 8(UseTab: Never 时几乎无感,与缩进对齐)
|
||
AccessModifierOffset: -4 # Google: -1(配合 IndentWidth 4,使 public/private 与 class 同级)
|
||
BreakBeforeBraces: Allman # Google: Attach
|
||
AllowShortFunctionsOnASingleLine: Inline # 需要显示Inline
|