8

XCode indents method chaining like this: xcode method chaining indentation

However if I press auto-format on appcode, it formats it in a weird way: appcode method chaining indentation

Does appcode have a configuration in the code-style to fix this? When I look into their coding style for swift, I can't seem to find the configuration to change this behavior.

Anyone know a way to solve this? Thanks.

1 Answers1

4

EDIT:

Another more convenient option is to use https://plugins.jetbrains.com/plugin/7177-file-watchers

with next conf:

enter image description here

More in docs:
https://www.jetbrains.com/help/idea/using-file-watchers.html#showFileWatcherInfoInEditor

PREVIOUS:

AppCode issue is very old...

So i solved it using https://github.com/nicklockwood/SwiftFormat :

  1. brew install swiftformat
  2. Add External Tools
    (program: /path/to/swiftformat, arguments: $FilePath$, working directory: $ProjectFileDir):

enter image description here

enter image description here

  1. Add KeyMap to your taste:

enter image description here

uptoyou
  • 1,427
  • 19
  • 24