Reputation: 57451
I'm trying to run a simple Scala program in Sublime text using the SublimeSBT plugin, but I can't seem to get it to work. Firstly, following http://www.scala-sbt.org/0.13/docs/Hello.html I ran the command
sbt new sbt/scala-seed.g8
This creates a directory called hello
. If I cd
to that directory and launch sublime using subl .
, and bring up the command palette, I don't see the commands prefixed with SBT:
which should be there according to the SublimeSBT usage instructions:
I'm pretty sure that I installed the plugin as it shows up as SublimeSBT
in Sublime Text
-> Preferences
-> Package Settings
. Can anyone explain why this is not working?
Upvotes: 0
Views: 316
Reputation: 57451
What I wanted was to simply run simple scripts (like https://scalafiddle.io/) and I solved this problem by
brew install scala
and adding the following build system as Scala.sublime-build
(cf. Configure Sublime Text build system for Scala?):
{
"cmd": ["/usr/local/bin/scala", "$file_name"],
"working_dir": "${project_path:${folder}}",
"selector": "source.scala"
}
Now when you press Cmd + B it will run the script (see screen grab below).
Upvotes: 1