我试着为emacs竞选。这是init.el - https://github.com/michaelpnash/emacs-for-scala/blob/master/.emacs.d/init.el
在the require ensime line之前,我添加了sbt和scala的路径。
(setenv "PATH" (concat "/usr/local/bin/scala:" (getenv "PATH")))
(setenv "PATH" (concat "/usr/local/bin/sbt:" (getenv "PATH")))
$ which sbt
/usr/local/bin/sbt
$ which scala
/usr/local/bin/scala在~/.sbt/plugins.sbt中,我有以下代码片段-
resolvers += Resolver.sonatypeRepo("snapshots")
addSbtPlugin("org.ensime" % "ensime-sbt" % "0.1.6")我克隆了一个示例boilerplate - git克隆git://github.com/dph01/scala-sbt-template.git
然后sbt“generate”
它运行得很好,但当我打开emacs时,它会给我一个错误-
check that set is on your PATH and that your config is compatible with github.com/ensime/ensime-server/wiki/Example-Configuration-File [(error Error reading configuration file, : (end-of-file))]发布于 2015-12-21 15:12:08
您使用的是一个古老版本的ensime-sbt。按照以下说明重新开始安装https://github.com/ensime/ensime-sbt
发布于 2015-09-12 23:56:31
将以下内容添加到您的init.el中(调用package-initialize之后):
(when (memq window-system '(mac ns))
(exec-path-from-shell-initialize))如果您希望始终从shell加载路径,则可能需要取消对mac的选中。
https://github.com/purcell/exec-path-from-shell
另请参阅:
https://stackoverflow.com/questions/30452881
复制相似问题