Browse Source

clang-format: refine config

skypjack 1 month ago
parent
commit
9173c4d2f1
1 changed files with 4 additions and 1 deletions
  1. 4 1
      .clang-format

+ 4 - 1
.clang-format

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