我试图为emacs运行ensime。这是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")
我克隆样本样板 - 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))]
答案 0 :(得分: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
另见: