0

我试图为 emacs 运行 ensime。这是 init.el - https://github.com/michaelpnash/emacs-for-scala/blob/master/.emacs.d/init.el

require ensime 行之前,我添加了 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")

我克隆了一个示例样板 - git clone git://github.com/dph01/scala-sbt-template.git

然后 sbt "ensime 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))]
4

2 回答 2

1

您使用的是古老版本的ensime-sbt. 按照这些说明安装它重新开始https://github.com/ensime/ensime-sbt

于 2015-12-21T07:12:07.873 回答
0

将以下内容添加到您的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://github.com/ensime/ensime-emacs/issues/225

https://github.com/ensime/ensime-server/issues/670

于 2015-09-12T15:56:30.947 回答