I'm trying to get Uncrustify to work for me with Objective-C code. Ordinarily, I'd like multi-line method signature declaration/implementations to be colon-aligned, like
- (void)doSomethingWithThis:(id)this
that:(id)that
other:(id)other;
However, sometimes the first parameter is not long enough to make that happen. In that case, I'd like to fall back to simple indentation, e.g.
- (void)application:(UIApplication *)application
handleEventsForBackgroundURLSession:(NSString *)identifier
completionHandler:(void (^)())completionHandler
However, here's what Uncrustify does for me in that case:
- (void) application:(UIApplication *)application
handleEventsForBackgroundURLSession:(NSString *)identifier
completionHandler:(void (^)())completionHandler
Um, yuch. Can I get Uncrustify to do what I want?
Here are some selected settings:
align_var_def_colon = true
align_oc_msg_spec_span = 1
align_oc_msg_colon_span = 1
align_oc_msg_colon_first = true
align_oc_decl_colon = true
Feel free to ask about more detail in the comments.