name Indent scope source.scala - comment settings increaseIndentPattern (?x) ^ .* \{ [^}"']* $ # curly brace indent | ^ .* \( [^)"']* $ # paren indent decreaseIndentPattern (?x) ^ (.*\*/)? \s* \} .* $ # curly brace dedent | ^ (.*\*/)? \s* \) .* $ # parent dedent bracketIndentNextLinePattern (?x) # if a line ends with `=`, then it's a line-wrapped declaration (e.g. val x = \n) ^ .* = \s* $ # attempts to detect a line-wrapped control construct without curly braces (e.g. if (foo) \n) | ^ .* \b(if|do|while|for)\b .* \) \s* $ # simpler line-wrapped control constructs | ^ .* \b(else)\b \s* $ | ^ .* \b(yield)\b \s* $