我最近遇到了类似的错误,但这是我解决它的方法(但我不知道如何解决它,所以这只是答案的一半)。我所做的是自定义ensime-inf-default-cmd-line
变量以使其具有值:'("sbt" "console")
. 这确实会启动交互式 Scala 环境。
编辑:
这是来自 的相关部分.emacs
,但我不确定它是否重要/在每次安装中都相同:
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
;;
;; more stuff ...
;; I'm not sure this line is correct / makes any difference
'(ensime-inf-cmd-template (quote ("sbt" "console" "-classpath" :classpath)))
;; This variable is used to launch the interpreter
'(ensime-inf-default-cmd-line (quote ("sbt" "console"))))
(require 'scala-mode2)
(add-to-list 'auto-mode-alist '("\\.scala$" . scala-mode))
(add-to-list 'load-path "~/.emacs.d/ensime/elisp/")
(require 'ensime)
(add-hook 'scala-mode-hook 'ensime-scala-mode-hook)
我已经scala-mode2
从 MELPA 安装了。sbt
通过从他们的站点下载 RPM安装了 0.12.0 版。我之前安装了 JRE 和 JDK,活动版本是 OpenJDK 1.7。安装的 Scala 是 2.9.2。我不知道如何识别 Ensime 的版本 :|