为 Scala 配置 Sublime Text 构建系统? [英] Configure Sublime Text build system for Scala?
问题描述
我正在尝试使用 SublimeText 为 Scala 配置构建系统,但我遇到了一些困难.我已经尝试了以下两种方法:
I'm trying to configure a build system for Scala with SublimeText, but I am having some difficulty. I have tried both of the following:
{
"shell_cmd": "scala",
"working_dir": "${project_path:${folder}}",
"selector": "source.scala"
}
{
"cmd": ["/path/to/bin/scala", "$file_name"],
"working_dir": "${project_path:${folder}}",
"selector": "source.scala",
"shell": true
}
这两种尝试都产生了相同的失败输出 - 它似乎启动了交互式 Scala shell,而不是运行我的脚本.有什么建议吗?
Both of these attempts produce the same failed output - it seems to start up the interactive Scala shell rather than running my script. Any advice?
推荐答案
结果证明有效的答案与第二个答案非常接近 - 显然我不应该打开一个新的 shell.如果有人可以在评论中说明何时设置 "shell": true
,那将非常有帮助.
The answer that worked turned out to be very close to the second answer - apparently I'm not supposed to open up a new shell. If someone can clarify when to set "shell": true
in the comments, that would be really helpful.
{
"cmd": ["/path/to/bin/scala", "$file_name"],
"working_dir": "${project_path:${folder}}",
"selector": "source.scala"
}
这篇关于为 Scala 配置 Sublime Text 构建系统?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!