IDEA编写Scala代码时自动显示变量类型 设置方法如下:settins -->Editor--> Code Style --> scala --Type Annotations 勾选框选部分 测试效果