Skip to content

Instantly share code, notes, and snippets.

@xiaozhuai
Last active September 26, 2025 11:17
Show Gist options
  • Select an option

  • Save xiaozhuai/88d43ac83151b9a5ad3032f0311ab302 to your computer and use it in GitHub Desktop.

Select an option

Save xiaozhuai/88d43ac83151b9a5ad3032f0311ab302 to your computer and use it in GitHub Desktop.
My .clang-format
BasedOnStyle: 'Google'
AlignConsecutiveMacros:
Enabled: true
AcrossEmptyLines: true
AcrossComments: true
AlignCompound: false
PadOperators: false
AccessModifierOffset: -4
#AlignAfterOpenBracket: AlwaysBreak
AlignArrayOfStructures: Right
ColumnLimit: 120
QualifierAlignment: Left
FixNamespaceComments: true
IndentWidth: 4
NamespaceIndentation: None
ObjCBlockIndentWidth: 4
PointerAlignment: Right
DerivePointerAlignment: false
SpaceBeforeRangeBasedForLoopColon: true
SpacesInContainerLiterals: false
InsertNewlineAtEOF: true
UseTab: Never
LineEnding: LF
LambdaBodyIndentation: OuterScope
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment