Skip to content
This repository was archived by the owner on Jul 25, 2022. It is now read-only.

Commit f0a3de0

Browse files
authored
Update for Metals v0.5 (#77)
* Update for Metals Tin release * Update Scala version * Update server flags * Update atom-package-deps * Update atom-languageclient * Update Metals version * Update Scala.js and enable Google Closure Compiler optimization
1 parent bc3c5f5 commit f0a3de0

File tree

4 files changed

+19
-12
lines changed

4 files changed

+19
-12
lines changed

build.sbt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ developers := List(Developer(
2121
url("https://github.com/laughedelic")
2222
))
2323

24-
scalaVersion := "2.12.7"
24+
scalaVersion := "2.12.8"
2525
scalacOptions ++= Seq(
2626
"-encoding", "utf8",
2727
"-feature",
@@ -45,7 +45,10 @@ libraryDependencies ++= Seq(
4545
"laughedelic" %%% "scalajs-atom-api" % "0.6.0+7-0c17704c",
4646
)
4747

48-
scalaJSLinkerConfig ~= { _.withSourceMap(true) }
48+
scalaJSLinkerConfig ~= {
49+
_.withSourceMap(true)
50+
.withESFeatures(_.withUseECMAScript2015(true))
51+
}
4952

5053
lazy val getCoursier = taskKey[File]("Get coursier binary if missing")
5154
getCoursier := {
@@ -76,8 +79,8 @@ apmKeywords := Seq(
7679
apmEngines := Map("atom" -> ">=1.25.0 <2.0.0")
7780

7881
apmDependencies := Map(
79-
"atom-languageclient" -> "0.9.8",
80-
"atom-package-deps" -> "4.6.2",
82+
"atom-languageclient" -> "0.9.9",
83+
"atom-package-deps" -> "5.0.0",
8184
"@atom/source-map-support" -> "0.3.4",
8285
"s-expression" -> "3.0.3",
8386
"minimatch" -> "3.0.4",

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.2.3
1+
sbt.version=1.2.8

project/plugins.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.25")
1+
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.28")
22
addSbtPlugin("com.dwijnand" % "sbt-dynver" % "3.1.0")
33
addSbtPlugin("ohnosequences" % "sbt-github-release" % "0.7.0")
44
addSbtPlugin("laughedelic" % "sbt-atom-package" % "0.1.2")

src/main/scala/servers/Metals.scala

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class HtmlView(title: String) extends js.Object {
2626
object Metals extends ScalaLanguageServer { server =>
2727
val name: String = "metals"
2828
val description: String = "Metals"
29-
val defaultVersion: String = "0.3.1"
29+
val defaultVersion: String = "0.5.2"
3030

3131
def trigger(projectPath: String): Boolean = {
3232
(projectPath / ".metals").isDirectory
@@ -39,12 +39,14 @@ object Metals extends ScalaLanguageServer { server =>
3939

4040
override def javaExtraArgs(projectPath: String): Seq[String] =
4141
Config.metals.javaArgs.get.toSeq ++ Seq(
42+
"-Dmetals.extensions=true",
4243
"-Dmetals.slow-task=status-bar",
4344
"-Dmetals.status-bar=on",
44-
"-Dmetals.file-watcher=custom",
45-
"-Dmetals.extensions=true",
46-
"-Dmetals.icons=atom",
4745
"-Dmetals.execute-client-command=on",
46+
"-Dmetals.icons=atom",
47+
"-Dmetals.signature-help-command='signature-help:view'",
48+
"-Dmetals.completion.command='autocomplete-plus:activate'",
49+
// "-Dmetals.override-def-format=unicode",
4850
)
4951

5052
def coursierArgs(projectPath: String): Seq[String] = Seq(
@@ -58,6 +60,9 @@ object Metals extends ScalaLanguageServer { server =>
5860
"build-connect" -> "Connect to build server",
5961
"sources-scan" -> "Rescan sources",
6062
"doctor-run" -> "Run doctor",
63+
"compile-cascade" -> "Cascade compile",
64+
"compile-cancel" -> "Cancel compilation",
65+
"bsp-switch" -> "Switch build server",
6166
)
6267

6368
lazy val doctorView = new HtmlView("Metals Doctor")
@@ -151,8 +156,7 @@ object MetalsConfig extends ConfigSchema {
151156
"-XX:+UseG1GC",
152157
"-XX:+UseStringDeduplication",
153158
"-Xss4m",
154-
"-Xms1G",
155-
"-Xmx4G",
159+
"-Xms100m",
156160
)
157161
)
158162

0 commit comments

Comments
 (0)