scala - 英特尔lij : How to indent 2 spaces of next line from beginning of the previous line?

标签 scala intellij-idea

enter image description here

案例类 Foo 的当前缩进看起来像这样,但我希望 ab 的缩进是从前一个的开头缩进 2 个空格像这样的线

case class Foo(
  a: Int,
  b: Int
)

这可能吗? Intellij 的设置在哪里?

最佳答案

您需要更改 IntelliJ 中的以下首选项。取消选中红色箭头指向的一项(多行对齐)并选中绿色箭头指向的一项(对参数使用正常缩进)。

现在idea将使用“正常缩进”作为参数,因此您需要检查您的正常缩进方案是什么。

enter image description here

关于scala - 英特尔lij : How to indent 2 spaces of next line from beginning of the previous line?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50403600/

相关文章:

scala - Spark清理shuffle溢出到磁盘

java - Checkstyle安装报错Intellij Idea

scala - 伴侣对象无法访问类上的私有(private)变量

scala - 如何创建一个可以稍后通过方法调用接收元素的 Source?

java - 如何在 S3 元数据中存储重音字符?

intellij-idea - 在 pom.xml 中添加依赖项后,Intellij 丢失了项目设置

java - IDEA中,如何在代码和注释之间自动添加一个空格?

eclipse - Eclipse 的参数名称提示

java - IntelliJ IDEA 多行编辑方式

list - 在 Scala 中展平元组列表?