google / swift

The Swift Programming Language
https://swift.org/
840 stars 66 forks source link

Configuring swift-format's line breaking rule #262

Open aqjune opened 5 years ago

aqjune commented 5 years ago

Hi, I'm enjoying swift-format. This is great!

I have a silly question: is it possible to configure line break-ness in this example:

  convenience public init(_ name: String) {
    self
      .init(where: { x in
      x.text == name
    })

I'd like to put self and .init( in the same line, and wonder it is possible to do it with existing configuration. I like swift-format's other line breaking suggestions, so this is the only case I want to update. Thanks!