emacs-scala-mode
emacs-scala-mode copied to clipboard
Allow to customize parameter list indentation level?
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!
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