小编V-X*_*V-X的帖子

如何使用clang格式格式化objective-c块?

我有以下代码,例如:

[cardRegistrationVC setCancelBlock:^{
  [weakSelf.navigationController popViewControllerAnimated:YES];
}];
Run Code Online (Sandbox Code Playgroud)

当我对它应用clang格式时,它变成:

[cardRegistrationVC setCancelBlock:^{ [weakSelf.navigationController popViewControllerAnimated:YES]; }];
Run Code Online (Sandbox Code Playgroud)

如您所见,块内的代码出现在同一行.但我应该总是换上新的路线.

如何设置clang格式正确?我的以下设置文件:

BasedOnStyle: LLVM
AllowShortIfStatementsOnASingleLine: false
AllowShortBlocksOnASingleLine: false
AllowShortFunctionsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakBeforeMultilineStrings: false
IndentCaseLabels: true
ColumnLimit: 120
ObjCSpaceAfterProperty: true
KeepEmptyLinesAtTheStartOfBlocks: true
PenaltyBreakString: 1000000
SpacesInContainerLiterals: false
Run Code Online (Sandbox Code Playgroud)

xcode objective-c clang-format

11
推荐指数
2
解决办法
2586
查看次数

消息“请稍候,正在更新 IntelliSense 和浏览信息。” 浪费我的时间

我正在处理非常大的项目,并且在几乎每次更改代码后都会出现“请稍候”消息,并显示“IntelliSense 和浏览信息已更新,请稍候”。text 和缓慢增加的数字包括正在处理 (x/150000) 几分钟的文件。

我的配置是否有问题,或者为什么该工具一次又一次地分析包含文件?

intellisense visual-studio-2010

5
推荐指数
0
解决办法
2499
查看次数