How to install sbt ensime plugin globally?

815 Views Asked by At

I've created ~/.sbt/1.0/plugins/plugins.sbt

After that cd into ~/.sbt/1.0/plugins

I've run addSbtPlugin("org.ensime" % "sbt-ensime" % "2.5.1")

But I had this error zsh: unknown sort specifier

Any Ideas?

1

There are 1 best solutions below

1
On BEST ANSWER

From sbt documentation. You should create a build.sbt (~/.sbt/1.0/plugins/build.sbt) file with that line:

addSbtPlugin("org.ensime" % "sbt-ensime" % "2.5.1")

You don't need to run this command.

Here is a link to documentation where you can see it:

https://www.scala-sbt.org/1.x/docs/Using-Plugins.html#Global+plugins

You can create ~/.sbt/1.0/plugins//build.sbt and put addSbtPlugin() expressions in there to add plugins to all your projects at once. Because doing so would increase the dependency on the machine environment, this feature should be used sparingly.