在mac上几乎正常工作,保存停止工作后的语法检查

时间:2011-11-14 19:32:59

标签: scala ensime

刚刚开始使用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)

看起来似乎默认的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)  

1 个答案:

答案 0 :(得分:0)

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