Update .clang-format

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2020-08-30 18:54:20 +01:00
parent 24f0241907
commit 01e6d680ab
No known key found for this signature in database
GPG Key ID: 37C999F617EA1A47
2 changed files with 105 additions and 103 deletions

View File

@ -5,12 +5,14 @@ BreakBeforeBraces: Attach
#BreakStringLiterals: true #BreakStringLiterals: true
IndentWidth: 8 IndentWidth: 8
AlignAfterOpenBracket: Align AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: true
ColumnLimit: 90 ColumnLimit: 90
#ExperimentalAutoDetectBinPacking: true #ExperimentalAutoDetectBinPacking: true
BinPackArguments: true BinPackArguments: true
BinPackParameters: true BinPackParameters: true
#ReflowComments: true #ReflowComments: true
AlignTrailingComments: true AlignTrailingComments: true
AlignConsecutiveMacros: true
SpacesBeforeTrailingComments: 8 SpacesBeforeTrailingComments: 8
SpaceBeforeAssignmentOperators: true SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements SpaceBeforeParens: ControlStatements
@ -18,7 +20,7 @@ AllowShortIfStatementsOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: true AllowShortCaseLabelsOnASingleLine: true
AllowShortFunctionsOnASingleLine: false AllowShortFunctionsOnASingleLine: false
IndentCaseLabels: false IndentCaseLabels: false
IndentPPDirectives: None IndentPPDirectives: AfterHash
PenaltyReturnTypeOnItsOwnLine: 0 PenaltyReturnTypeOnItsOwnLine: 0
PenaltyBreakAssignment: 0 PenaltyBreakAssignment: 0
PenaltyBreakBeforeFirstCallParameter: 1 PenaltyBreakBeforeFirstCallParameter: 1

View File

@ -82,14 +82,14 @@ const char *const WINTYPES[NUM_WINTYPES] = {
"popup_menu", "tooltip", "notification", "combo", "dnd", "popup_menu", "tooltip", "notification", "combo", "dnd",
}; };
// clang-format off
/// Names of backends. /// Names of backends.
const char *const BACKEND_STRS[] = {[BKEND_XRENDER] = "xrender", const char *const BACKEND_STRS[] = {
[BKEND_XRENDER] = "xrender",
[BKEND_GLX] = "glx", [BKEND_GLX] = "glx",
[BKEND_XR_GLX_HYBRID] = "xr_glx_hybrid", [BKEND_XR_GLX_HYBRID] = "xr_glx_hybrid",
[BKEND_DUMMY] = "dummy", [BKEND_DUMMY] = "dummy",
NULL}; NULL,
// clang-format on };
// === Global variables === // === Global variables ===