swift-emacs / swift-mode

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

Indention bug: return statement with ternary operator #60

Closed ckruse closed 9 years ago

ckruse commented 10 years ago

Hi,

a ternary operator is a common thing in return statements, and often they contain line breaks. A ternary operator should therefore be indented:

instead of this (current behaviour):

return order!.deliver ?
OrderViewTableDeliveryCells.lastCellIndex.rawValue :
OrderViewTableTakeAwayCells.LastCellIndex.rawValue

I'd like to get this:

return order!.deliver ?
  OrderViewTableDeliveryCells.lastCellIndex.rawValue :
  OrderViewTableTakeAwayCells.LastCellIndex.rawValue