hvesalai / emacs-scala-mode

The definitive scala-mode for emacs
http://ensime.org
GNU General Public License v3.0
361 stars 68 forks source link

scala-indent:align-forms #120

Closed nloyola closed 7 years ago

nloyola commented 7 years ago

I've set scala-indent:align-forms to t but the indentation is wrong. This is what I get:

// (setq scala-indent:align-forms t)

val x = if (foo)
    true
        else
          false

The line that has true is not indented correctly.

I'm using scala mode version 20160902.525 on Emacs 25.1-rc2 running on Ubuntu 16.04.

hvesalai commented 7 years ago

indeed a bug

fommil commented 7 years ago

Scalariform isn't great with this either. If you find a scalariform setting that makes this look pretty, please let me know.

hvesalai commented 7 years ago

This has worked and I think it got broken at some point

hvesalai commented 7 years ago

the bug is that scala-indent:goto-body-anchor goes to scala-indent:backward-sexp-to-beginning-of-line instead of going to the beginning of if