swift-emacs / swift-mode

Emacs support for Apple's Swift programming language.
GNU General Public License v3.0
372 stars 47 forks source link

Modify indents around comma to meet Xcode spec #99

Closed uk-ar closed 9 years ago

uk-ar commented 9 years ago

I fixed indents around comma to meet Xcode(6.4) spec.

case statement

switch true {
case foo where bar,
|bar where baz:
 }
switch true {
case foo where bar,
    |bar where baz:
 }

class statement

class Foo: Foo, Bar,
|Baz {
 }
class Foo: Foo, Bar,
    |Baz {
 }
ap4y commented 9 years ago

Hey @uk-ar can we this optional (something like this)? I personally prefer current formatting and I think some of the users asked for such indentation.

uk-ar commented 9 years ago

Hi @ap4y ! Thanks for early reply. I added an option(swift-indent-hanging-comma-offset) for this spec. And It's default value is similar to before. How about this?

ap4y commented 9 years ago

Thanks for the changes @uk-ar, looks awesome.