Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/three.js/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
生成文件格式不正确,正在尝试集成scalariform自动格式化程序_Scala_Sbt - Fatal编程技术网

生成文件格式不正确,正在尝试集成scalariform自动格式化程序

生成文件格式不正确,正在尝试集成scalariform自动格式化程序,scala,sbt,Scala,Sbt,我正在尝试为Scala实现scalariform自动格式化程序 下面是build.sbt: import com.typesafe.sbt.SbtScalariform._ import scalariform.formatter.preferences._ name := "MyApp" scalariformSettings ScalariformKeys.preferences := ScalariformKeys.preferences.value .setPrefere

我正在尝试为Scala实现scalariform自动格式化程序

下面是build.sbt:

  import com.typesafe.sbt.SbtScalariform._

import scalariform.formatter.preferences._

name := "MyApp"

scalariformSettings

ScalariformKeys.preferences := ScalariformKeys.preferences.value
  .setPreference(RewriteArrowSymbols, true)
  .setPreference(AlignParameters, true)
  .setPreference(AlignSingleLineCaseStatements, true)
  .setPreference(PlaceScaladocAsterisksBeneathSecondAsterisk, true)
  .setPreference(MultilineScaladocCommentsStartOnFirstLine, true)
plugins.sbt:

addSbtPlugin("com.typesafe.sbt" % "sbt-scalariform" % "1.3.0")
但当我执行
sbt reload
命令接收错误时:

 error: object typesafe is not a member of package com
import com.typesafe.sbt.SbtScalariform._
生成文件格式正确吗


更新:这似乎是代理问题:SBT似乎没有使用我的代理设置。

为什么要尝试在
build.SBT
中添加SBT插件?这不应该放在plugins.sbt中吗?@m-z是的,对不起。问题更新请在此处阅读-no
import com.typesafe…
。我猜你在看叉子还是旧版本?