Skip to content

Commit e82e1b8

Browse files
authored
Merge pull request #418 from per1234/formatter-configuration-link
Replace IDE 2.x configuration file content with link to source
2 parents db279a9 + 3200286 commit e82e1b8

File tree

1 file changed

+2
-147
lines changed
  • content/software/ide-v2/tutorials/ide-v2-customize-auto-formatter

1 file changed

+2
-147
lines changed

content/software/ide-v2/tutorials/ide-v2-customize-auto-formatter/content.md

+2-147
Original file line numberDiff line numberDiff line change
@@ -63,154 +63,9 @@ If you add a `.clang-format` configuration file to the root of a sketch, the Ard
6363

6464
Here you can find the default formatting file used in the Arduino IDE 2.0. If you wish to customize how your auto formatting acts in the IDE then starting with this file is a good idea.
6565

66-
***Please note that the custom configuration file completely overrides the Arduino default configuration, rather than merging with it. Any configuration option you don't set in your custom file will be set to the ClangFormat default value.***
66+
https://raw.githubusercontent.com/arduino/tooling-project-assets/main/other/clang-format-configuration/.clang-format
6767

68-
```cpp
69-
---
70-
Language: Cpp
71-
# LLVM is the default style setting, used when a configuration option is not set here
72-
BasedOnStyle: LLVM
73-
AccessModifierOffset: -2
74-
AlignAfterOpenBracket: Align
75-
AlignConsecutiveAssignments: false
76-
AlignConsecutiveBitFields: false
77-
AlignConsecutiveDeclarations: false
78-
AlignConsecutiveMacros: false
79-
AlignEscapedNewlines: DontAlign
80-
AlignOperands: Align
81-
AlignTrailingComments: true
82-
AllowAllArgumentsOnNextLine: true
83-
AllowAllConstructorInitializersOnNextLine: true
84-
AllowAllParametersOfDeclarationOnNextLine: true
85-
AllowShortBlocksOnASingleLine: Always
86-
AllowShortCaseLabelsOnASingleLine: true
87-
AllowShortEnumsOnASingleLine: true
88-
AllowShortFunctionsOnASingleLine: Empty
89-
AllowShortIfStatementsOnASingleLine: Always
90-
AllowShortLambdasOnASingleLine: Empty
91-
AllowShortLoopsOnASingleLine: true
92-
AlwaysBreakAfterDefinitionReturnType: None
93-
AlwaysBreakAfterReturnType: None
94-
AlwaysBreakBeforeMultilineStrings: false
95-
AlwaysBreakTemplateDeclarations: No
96-
BinPackArguments: true
97-
BinPackParameters: true
98-
# Only used when "BreakBeforeBraces" set to "Custom"
99-
BraceWrapping:
100-
AfterCaseLabel: false
101-
AfterClass: false
102-
AfterControlStatement: Never
103-
AfterEnum: false
104-
AfterFunction: false
105-
AfterNamespace: false
106-
#AfterObjCDeclaration:
107-
AfterStruct: false
108-
AfterUnion: false
109-
AfterExternBlock: false
110-
BeforeCatch: false
111-
BeforeElse: false
112-
BeforeLambdaBody: false
113-
BeforeWhile: false
114-
IndentBraces: false
115-
SplitEmptyFunction: false
116-
SplitEmptyRecord: false
117-
SplitEmptyNamespace: false
118-
# Java-specific
119-
#BreakAfterJavaFieldAnnotations:
120-
BreakBeforeBinaryOperators: NonAssignment
121-
BreakBeforeBraces: Attach
122-
BreakBeforeTernaryOperators: true
123-
BreakConstructorInitializers: BeforeColon
124-
BreakInheritanceList: BeforeColon
125-
BreakStringLiterals: false
126-
ColumnLimit: 0
127-
# "" matches none
128-
CommentPragmas: ""
129-
CompactNamespaces: false
130-
ConstructorInitializerAllOnOneLineOrOnePerLine: true
131-
ConstructorInitializerIndentWidth: 2
132-
ContinuationIndentWidth: 2
133-
Cpp11BracedListStyle: false
134-
DeriveLineEnding: true
135-
DerivePointerAlignment: true
136-
DisableFormat: false
137-
# Docs say "Do not use this in config files". The default (LLVM 11.0.1) is "false".
138-
#ExperimentalAutoDetectBinPacking:
139-
FixNamespaceComments: false
140-
ForEachMacros: []
141-
IncludeBlocks: Preserve
142-
IncludeCategories: []
143-
# "" matches none
144-
IncludeIsMainRegex: ""
145-
IncludeIsMainSourceRegex: ""
146-
IndentCaseBlocks: true
147-
IndentCaseLabels: true
148-
IndentExternBlock: Indent
149-
IndentGotoLabels: false
150-
IndentPPDirectives: None
151-
IndentWidth: 2
152-
IndentWrappedFunctionNames: false
153-
InsertTrailingCommas: None
154-
# Java-specific
155-
#JavaImportGroups:
156-
# JavaScript-specific
157-
#JavaScriptQuotes:
158-
#JavaScriptWrapImports
159-
KeepEmptyLinesAtTheStartOfBlocks: true
160-
MacroBlockBegin: ""
161-
MacroBlockEnd: ""
162-
# Set to a large number to effectively disable
163-
MaxEmptyLinesToKeep: 100000
164-
NamespaceIndentation: None
165-
NamespaceMacros: []
166-
# Objective C-specific
167-
#ObjCBinPackProtocolList:
168-
#ObjCBlockIndentWidth:
169-
#ObjCBreakBeforeNestedBlockParam:
170-
#ObjCSpaceAfterProperty:
171-
#ObjCSpaceBeforeProtocolList
172-
PenaltyBreakAssignment: 1
173-
PenaltyBreakBeforeFirstCallParameter: 1
174-
PenaltyBreakComment: 1
175-
PenaltyBreakFirstLessLess: 1
176-
PenaltyBreakString: 1
177-
PenaltyBreakTemplateDeclaration: 1
178-
PenaltyExcessCharacter: 1
179-
PenaltyReturnTypeOnItsOwnLine: 1
180-
# Used as a fallback if alignment style can't be detected from code (DerivePointerAlignment: true)
181-
PointerAlignment: Right
182-
RawStringFormats: []
183-
ReflowComments: false
184-
SortIncludes: false
185-
SortUsingDeclarations: false
186-
SpaceAfterCStyleCast: false
187-
SpaceAfterLogicalNot: false
188-
SpaceAfterTemplateKeyword: false
189-
SpaceBeforeAssignmentOperators: true
190-
SpaceBeforeCpp11BracedList: false
191-
SpaceBeforeCtorInitializerColon: true
192-
SpaceBeforeInheritanceColon: true
193-
SpaceBeforeParens: ControlStatements
194-
SpaceBeforeRangeBasedForLoopColon: true
195-
SpaceBeforeSquareBrackets: false
196-
SpaceInEmptyBlock: false
197-
SpaceInEmptyParentheses: false
198-
SpacesBeforeTrailingComments: 2
199-
SpacesInAngles: false
200-
SpacesInCStyleCastParentheses: false
201-
SpacesInConditionalStatement: false
202-
SpacesInContainerLiterals: false
203-
SpacesInParentheses: false
204-
SpacesInSquareBrackets: false
205-
Standard: Auto
206-
StatementMacros: []
207-
TabWidth: 2
208-
TypenameMacros: []
209-
# Default to LF if line endings can't be detected from the content (DeriveLineEnding).
210-
UseCRLF: false
211-
UseTab: Never
212-
WhitespaceSensitiveMacros: []
213-
```
68+
***Please note that the custom configuration file completely overrides the Arduino default configuration, rather than merging with it. Any configuration option you don't set in your custom file will be set to the ClangFormat default value.***
21469

21570
## Conclusion
21671

0 commit comments

Comments
 (0)