我正在使用 ClangFormat .
我希望以此更新我的 ReactiveCocoa 代码的样式
[[self.myService indexCase] subscribeNext:^(id response) {
DDLogDebug(@"response : %@", response);
}
error:^(NSError *error) {
[self.dataManager sendError:error];
}];
对此
[[self.myService indexCase]
subscribeNext:^(id response) {
DDLogDebug(@"response : %@", response);
} error:^(NSError *error) {
[self.dataManager sendError:error];
}];
我应该查看哪些 ClangFormat 属性以实现此目的?
我当前的 .clang-format
文件:
BasedOnStyle: WebKit
AlignTrailingComments: true
AllowShortFunctionsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: true
BreakBeforeBraces: Linux
ColumnLimit: 120
IndentCaseLabels: true
IndentWidth: 4
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 2
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
PointerBindsToType: false
SpacesBeforeTrailingComments: 1
TabWidth: 4
UseTab: Never
最佳答案
添加这个:
AllowAllParametersOfDeclarationOnNextLine True
或
BinPackParameters True
关于objective-c - ReactiveCocoa 的 ClangFormat 样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38245474/