Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configure Sublime Text build system for 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
}

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?

like image 434
Kvass Avatar asked May 11 '14 17:05

Kvass


1 Answers

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"
}
like image 193
Kvass Avatar answered Sep 19 '22 23:09

Kvass