And*_*rey 7 scala intellij-idea
IntelliJ IDEA Scala插件具有自动添加:Unit到单元返回功能结束的功能.所以,例如,如果我正在编写一个副作用函数foo:
def foo() {}
当我Enter在光标位于大括号之间时,我会得到以下内容:
def foo():Unit = {
}
我个人更喜欢以下内容:
def foo() {
}
那么,我该如何关闭此功能呢?
And*_*rey 12
tldr;
Preferences > Code Style > Scala > Other > Uncheck: Enforce procedure syntax [blah blah blah]
Preferences对话框Code StyleScalaOtherEnforce procedure syntax for methods with Unit return type| 归档时间: | 
 | 
| 查看次数: | 842 次 | 
| 最近记录: |