Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to customize parameter list indentation level? #172

Open
mzhaom opened this issue Oct 24, 2021 · 1 comment
Open

Allow to customize parameter list indentation level? #172

mzhaom opened this issue Oct 24, 2021 · 1 comment

Comments

@mzhaom
Copy link

mzhaom commented Oct 24, 2021

Hi,

Our company uses 2 spaces for general indentation, but 4 spaces for parameter list, as stated here:
https://github.com/databricks/scala-style-guide#indent

def newAPIHadoopFile[K, V, F <: NewInputFormat[K, V]](
    path: String,
    fClass: Class[F],
    kClass: Class[K],
    vClass: Class[V],
    conf: Configuration = hadoopConfiguration): RDD[(K, V)] = {
  // method body
}

Is there any chance to support this? Thank you!

@hvesalai
Copy link
Owner

You could implement it here https://github.com/hvesalai/emacs-scala-mode/blob/master/scala-mode-indent.el#L610

What you would do is add an other case into the cond list which goes back to see if the character before the point anchor is (, and if so, then returns (+ (* 2 scala-indent:step) lead))

If you want the change to be in the official release, you need to make the new feature configurable

mingzhao-db added a commit to mzhaom/emacs-scala-mode that referenced this issue Oct 26, 2021
control whether the parameter list of function/class should have a
different indentation level.

See discussion in hvesalai#172
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants