2

刚开始使用 Scala 编程。根据此处的说明,我使用 emacs、sbt、ensime 设置了一个环境。(http://jawher.net/2011/01/17/scala-development-environment-emacs-sbt-ensime/)

它工作了几天,但是当我退出 emacs 并重新启动时,我无法进行语法检查(保存缓冲区后发生的检查)。

打开文件后我开始 ensime,我在模式行上看到它说 ENSIME:已连接。但由于某种原因,我不再获得文件中错误的亮点。

有什么帮助吗?它快把我逼疯了。

注意:我可以用 ensime 做其他事情,比如启动一个 sbt 子进程。

谢谢翼

有更多信息......我注意到当它不起作用*inferior-ensime-server*时, scala> REPL 上的挂起

Welcome to Scala version 2.7.7.final (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_26).
Type in expressions to have them evaluated.
Type :help for more information.

scala>

当它工作时,它会通过 scala> 提示符并进入 swank (这适用于我的 linux 机器)

Handling RPC: (swank:symbol-designations /home/wing/work/scala-test1/src/main/scala/Main.scala 0 96 nil)
Writing: 000051(:return (:ok (:file "/home/wing/work/scala-test1/src/main/scala/Main.scala")) 3)
Indexing completed in 13.394 seconds.
Indexed 13564 classes with 117390 methods.
Writing: 000012(:indexer-ready t)

似乎 ensime emacs 脚本无法在 scala 流中找到某些内容。

--- Buffers from emacs ---
*Message*

("emacs")
Loading encoded-kb...done
Loading cl-macs...done
Loading derived...done
Loading edmacro...done
Loading easy-mmode...done
For information about the GNU Project and its goals, type C-h C-p.
Main.scala has auto save data; consider M-x recover-this-file
Loading image...done
Loading advice...done
Loading cl-seq...done
Polling "/var/folders/0j/0jDMoITREkmpZqCgO11BCk+++TM/-Tmp-/ensime_port.2349".. (Abort with `M-x ensime-abort-connection'.) [4 times]
Read port 51568 from "/var/folders/0j/0jDMoITREkmpZqCgO11BCk+++TM/-Tmp-/ensime_port.2349".
Connecting to Swank on port 51568.. [2 times]
Loading cl-extra...done
Connected.
Wrote /Users/wing/work/scala/ensime-p1/src/main/scala/Main.scala [2 times]

-----
*ensime-events*

(:swank-rpc
 (swank:connection-info)
 1)
(:return
 (:ok
  (:pid nil :server-implementation
        (:name "ENSIMEserver")
        :machine nil :features nil :version "0.0.1"))
 1)
(:swank-rpc
 (swank:init-project
  (:project-package "com.myproject" :use-sbt t :root-dir "/Users/wing/work/scala/ensime-p1/"))
 2)  
4

1 回答 1

0

您可以检查 ensime 的 emacs 缓冲区是否有错误并在此处发布它们。

于 2011-11-14T22:39:59.270 回答