I am trying to figure out how to prevent clang-format from adding line breaks when there is a block as an argument.
For example, I want:
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(500 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ NSLog(@"here"); });
Not this:
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(500 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ NSLog(@"here"); });
To throw the key into things, I also want some block arguments to be broken, for example:
[self method:argument success:^(NSString* result) {
Can someone help me figure this out? Is this possible with clang-format?
My .clang-format
source share