@keypath can't auto align when used in a dictionary?
CodeLife2012 opened this issue · comments
CodeLife2012 commented
Write this:
@{ @keypath(key1) :value2
@keypath(key1) :value2
}
When tapped enter
, can't auto align the first and second line?
Any workaround for this?
Justin Spahr-Summers commented
Sorry, I don't have any idea, and this doesn't sound like an issue with libextobjc.
CodeLife2012 commented
Not a issue with libextobjc, but I just want to know whether have a solution for this.
Maybe someone watched this project will give some help
Anton Bukov commented
I am using clang-formatter with Xcode plugin on file Saving action.
CodeLife2012 commented
@k06a
I tried the default config in clang-formatter, but can't handle this.
Did you changed something?
Anton Bukov commented
Here is my .clang-format
file for Objective-C lang in the root of repo:
.clang-format
---
Language: Cpp
AccessModifierOffset: -2
AlignEscapedNewlinesLeft: false
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortFunctionsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: false
BinPackParameters: true
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
BeforeCatch: false
BeforeElse: true
IndentBraces: false
BreakBeforeBinaryOperators: false
BreakBeforeBraces: Custom
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
ColumnLimit: 0
CommentPragmas: '^ IWYU pragma:'
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerBinding: false
ExperimentalAutoDetectBinPacking: false
IndentCaseLabels: true
IndentFunctionDeclarationAfterType: true
IndentWidth: 4
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
ObjCBlockIndentWidth: 4
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerBindsToType: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
Standard: Cpp11
TabWidth: 8
UseTab: Never
SortIncludes: true
IncludeCategories:
- Regex: '^<.*>'
Priority: 0
- Regex: '^".*/'
Priority: 1
- Regex: '^".*\+'
Priority: 2
- Regex: '^"'
Priority: 3