GithubHelp home page GithubHelp logo

Comments (8)

hvesalai avatar hvesalai commented on August 10, 2024

Thank's for the feedback. Awsome sounds good!

I've been discussing this with many developers and there seems to be two equally strong opposite camps. The way I see it is that I need to make the README.md very clear on this issue.

We need to hold a beauty contest once the mode has had enough testing that I feel confident in anouncing it to the world (altho the word has leeked already, I have learned).

Comments from other users on this issue are also welcomed here.

from emacs-scala-mode.

non avatar non commented on August 10, 2024

I agree with Brian's position (as you probably already knew). I think a beauty contest makes sense, although if a few more people weigh in on this side you may want to just flip the defaults (and warn current users).

Clearly those of us who know the mode is good can just configure it the way we want... it's just a question of what seems like better behavior to new users.

Sorry for spilling the beans, btw!

from emacs-scala-mode.

ymasory avatar ymasory commented on August 10, 2024

I agree with:

(setq scala-indent:indent-value-expression nil)

since this is the idiomatic indentation:

def foo = if(true) {
  bar
}

not

def foo = if(true) {
    bar
  }

Having the latter as the default would invite re-formatting wars on teams where the devs are using different developers :)

This one I also agree with, but I'm not as confient that it's definitely "more idiomatic".

(setq scala-indent:align-parameters nil)

Can someone comment on what this one does?

(setq scala-indent:align-forms nil)

from emacs-scala-mode.

puffnfresh avatar puffnfresh commented on August 10, 2024

@ymasory align-forms non-nil:

val x = if (kala)
          foo
        else if (koira)
          bar
        else
          zot

align-forms nil:

val x = if (kala)
    foo
  else if (koira)
    bar
  else
    zot

from emacs-scala-mode.

hvesalai avatar hvesalai commented on August 10, 2024

align-forms nil, indent-value-expression nil is actually:

val x = if (kala)
  foo
else if (koira)
  bar
else
  zot

Which I personally find hard to read.

from emacs-scala-mode.

non avatar non commented on August 10, 2024

...but which is exactly what I want. 👍

from emacs-scala-mode.

ymasory avatar ymasory commented on August 10, 2024

Thanks @hvesalai. I vote nil for all three then! The only items I tend to align between lines are the arrows in pattern matches.

Perhaps the scalariform defaults should be used? I believe ScalaIDE and ENSIME both use the Scalariform defaults without modification. Not sure about IntelliJ and othes.

from emacs-scala-mode.

hvesalai avatar hvesalai commented on August 10, 2024

Ok. Let it be so.

from emacs-scala-mode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.