Skip to content

Fix indentation of switch-case

Compare
Choose a tag to compare
@taku0 taku0 released this 01 Oct 11:10
· 102 commits to master since this release

If swift-mode:switch-case-offset is equal to or greater than swift-mode:basic-offset, the body of switch statements are indented to swift-mode:switch-case-offset + swift-mode:basic-offset.

Before:

switch foo {
      case 1:
    print(1)
      default:
    print("other")
}

After:

switch foo {
      case 1:
          print(1)
      default:
          print("other")
}

Thanks @woolsweater .