#
#https://clang.llvm.org/docs/ClangFormatStyleOptions.html
#https://clang.llvm.org/docs/ClangFormat.html
#

Language: Cpp

#If true, analyze the formatted file for the most common alignment of & and *. PointerAlignment is then used only as fallback.
BasedOnStyle: LLVM

# LInux 方式,Allman Win的方式
BreakBeforeBraces: Allman

IndentCaseLabels: false

DerivePointerAlignment: false

IndentWidth: 4

#注释换行对齐
ReflowComments: true

#@[]里面两边空格，原true
SpacesInContainerLiterals: true

#Add a space after @property in Objective-C, i.e. use \@property (readonly) instead of \@property(readonly).
ObjCSpaceAfterProperty: true

#The number of characters to use for indentation of ObjC blocks.
ObjCBlockIndentWidth: 4

#If true, if (a) return; can be put on a single line.
AllowShortIfStatementsOnASingleLine: false

#仅允许空函数放在一行
AllowShortFunctionsOnASingleLine: Empty

# 表达式多行显示
BreakBeforeBinaryOperators: NonAssignment 

#变量“=”对齐
AlignConsecutiveAssignments: true
#注释对齐
AlignTrailingComments: true
#函数参数对齐
AlignAfterOpenBracket: Align
AlignConsecutiveDeclarations: false

#AlignOperands: true

#If false, spaces will be removed before assignment operators.
SpaceBeforeAssignmentOperators: true

#Pointer and reference alignment style.
PointerAlignment: Right

#The maximum number of consecutive empty lines to keep.
MaxEmptyLinesToKeep: 1

#每行字符的长度
ColumnLimit: 120

#括号后加空格
SpaceAfterCStyleCast: true

#函数参数换行
AllowAllParametersOfDeclarationOnNextLine: true

#tab键盘的宽度
TabWidth: 4
UseTab: Never
---
Language: JavaScript
# Use 100 columns for JS.
ColumnLimit: 0
