简体   繁体   English

使用ENSIME和使用Maven建立的Scala项目

[英]Using ENSIME with an established Scala project using Maven

I am looking into setting up a development environment using emacs/ENSIME, hacking on this project . 我正在研究使用emacs / ENSIME建立一个开发环境,并对该项目进行黑客攻击。 The project uses Maven, though, with poms at the top level as well as within the three component subprojects (format, cli, core). 但是,该项目使用Maven,在顶层以及三个子项目(格式,cli,核心)中都带有poms。

I am unable to figure out what I need to do with my .ensime configuration in order to get up and running (as the default configuration clearly doesn't cut it, nor can I get any of the various ensime-maven-cfg scripts I've found to work). 我无法弄清楚要启动并运行我的.ensime配置需要做些什么(因为默认配置显然无法削减它,我也无法获得各种ensime-maven-cfg脚本)已经找到了工作)。

The most recent information I've found regarding Maven + ENSIME is from a year ago, here . 我发现的有关Maven + ENSIME的最新信息来自一年前的此处 The provided script does not work. 提供的脚本不起作用。

There must be someone who uses Maven and ENSIME successfully… I hope. 肯定有人成功使用了Maven和ENSIME。 How should I go about setting up my ENSIME configuration? 我应该如何设置ENSIME配置?

EDIT: I got much of it working just by setting :source-roots list in the .ensime config file. 编辑:我只是通过在.ensime配置文件中设置:source-roots list来工作。 Adding the deps (via a hacked together Python script similar to the one linked above) doesn't seem to help with building, BUT I do have the Scala REPL now loading all of my deps properly. 添加deps(通过类似于上面链接的被黑客攻击的Python脚本 )似乎对构建没有帮助,但是我确实有Scala REPL现在可以正确加载我的所有deps。 The semantics highligher & some other things still aren't working very well, but I can jump to definitions and use the type inspector. 语义highligher和其他一些东西仍然不能很好地工作,但是我可以跳到定义并使用类型检查器。

All in all, it's much closer to working completely. 总而言之,它更接近于完全工作。

I've written a script that solves this problem; 写了一个脚本来解决这个问题。 it's a bit hacky, and could be made to generate a smaller ensime config, but it suits my purposes. 它有点hacky,可以用来生成较小的ensime配置,但它适合我的目的。

I've added some commits to the ensime-maven-plugin here: https://github.com/parsnips/ensime-maven-plugin 我在这里向ensime-maven-plugin添加了一些提交: https : //github.com/parsnips/ensime-maven-plugin

Bringing that project back from the dead. 把那个项目从死里复活。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM