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 with closure #86

Closed roxlu closed 8 years ago

roxlu commented 9 years ago

Hey Chris,

I merged your swift-mode this week and it's working a lot beter! Awesome work!

I'm only still having problems with idention. I've pasted some example code here: https://gist.github.com/roxlu/3c899602069a7b471cae#file-newslocationviewcontroller-swift-L59-L60

Notice how the closure indention breaks. For some indention issues I found work-arounds but not for this one.

Thanks

roxlu commented 9 years ago

Hey Chris, I just figured out why the indention isn't working. When I move this curly brace a bit up so it's directly positioned after the close ) of the function the indention works again. I'm talking about this curly brace: https://gist.github.com/roxlu/3c899602069a7b471cae#file-newslocationviewcontroller-swift-L31

ap4y commented 9 years ago

Yeah, I'm pretty sure grammar for this case of declaration is currently missing, will check it at the weekend.

chrisbarrett commented 9 years ago

I'm gonna chime in here and thank you heaps Arthur for all your hard work, especially on the indentation! You basically own this package now. ;)

ap4y commented 9 years ago

Haha, thanks for the kind words Chris. That's may sound weird but SMIE can be fun once you get grasp of it :)

taku0 commented 8 years ago

Closing in favor of the new indentation logic.