瀏覽代碼

clang-format: refine config

skypjack 1 月之前
父節點
當前提交
9173c4d2f1
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      .clang-format

+ 4 - 1
.clang-format

@@ -11,6 +11,7 @@ AllowShortLambdasOnASingleLine: All
 AllowShortLoopsOnASingleLine: true
 AlwaysBreakTemplateDeclarations: Yes
 BreakBeforeBinaryOperators: NonAssignment
+BreakBeforeBraces: Attach
 BreakBeforeConceptDeclarations: Always
 BreakBeforeTernaryOperators: true
 ColumnLimit: 0
@@ -30,10 +31,12 @@ IncludeIsMainRegex: "^$"
 IndentPPDirectives: AfterHash
 IndentRequiresClause: false
 IndentWidth: 4
+InsertBraces: true
+InsertNewlineAtEOF: true
 KeepEmptyLinesAtTheStartOfBlocks: false
 Language: Cpp
 PointerAlignment: Right
-RequiresClausePosition: OwnLine
+RequiresClausePosition: OwnLineWithBrace
 RequiresExpressionIndentation: OuterScope
 SpaceAfterCStyleCast: false
 SpaceAfterTemplateKeyword: false