-
-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy path.clang-format
More file actions
68 lines (59 loc) · 1.77 KB
/
.clang-format
File metadata and controls
68 lines (59 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# SPDX-FileCopyrightText: 2026 fuddlesworth
# SPDX-License-Identifier: GPL-3.0-or-later
#
# KDE-style clang-format for PlasmaZones (C++20, Qt/KDE conventions).
# See: https://community.kde.org/Policies/Frameworks_Coding_Style
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
Language: Cpp
BasedOnStyle: WebKit
# C++20 (project uses set(CMAKE_CXX_STANDARD 20))
Standard: c++20
# 4 spaces indent (KDE standard)
IndentWidth: 4
TabWidth: 4
# 120 characters (KDE common choice)
ColumnLimit: 120
# Sort includes inside groups (set false to avoid churn until a dedicated pass)
SortIncludes: false
# Braces: break after class/struct/function, same line for control flow
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: true
AfterControlStatement: false
AfterEnum: false
AfterFunction: true
AfterNamespace: false
AfterStruct: true
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
# Pointer/ref alignment: int *foo (left, KDE/Qt style)
PointerAlignment: Left
AlignAfterOpenBracket: Align
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortEnumsOnASingleLine: false
AlwaysBreakBeforeMultilineStrings: true
BinPackArguments: true
BinPackParameters: true
BreakBeforeBinaryOperators: NonAssignment
Cpp11BracedListStyle: true
SpaceBeforeCpp11BracedList: false
KeepEmptyLinesAtTheStartOfBlocks: false
NamespaceIndentation: None
SpaceAfterTemplateKeyword: false
AlwaysBreakTemplateDeclarations: true
AllowShortLambdasOnASingleLine: Empty
AllowAllArgumentsOnNextLine: false
# Qt macros: keep opening brace attached
ForEachMacros:
- foreach
- Q_FOREACH
- Q_FOREVER
- QBENCHMARK
- QBENCHMARK_ONCE