Skip to content

Commit c63cbd5

Browse files
authored
Merge pull request scala#5160 from dotty-staging/wip/vscode-create-config
Configure IDE with sbt server
2 parents c5ef2d0 + d27f5a4 commit c63cbd5

File tree

6 files changed

+318
-158
lines changed

6 files changed

+318
-158
lines changed

project/Build.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -990,11 +990,12 @@ object Build {
990990
includeFilter in unmanagedSources := NothingFilter | "*.ts" | "**.json",
991991
watchSources in Global ++= (unmanagedSources in Compile).value,
992992
resourceGenerators in Compile += Def.task {
993-
val defaultIDEConfig = baseDirectory.value / "out" / "default-dotty-ide-config"
994-
IO.write(defaultIDEConfig, dottyVersion)
993+
// Resources that will be copied when bootstrapping a new project
994+
val buildSbtFile = baseDirectory.value / "out" / "build.sbt"
995+
IO.write(buildSbtFile, s"""scalaVersion := "$dottyVersion"""")
995996
val dottyPluginSbtFile = baseDirectory.value / "out" / "dotty-plugin.sbt"
996997
IO.write(dottyPluginSbtFile, s"""addSbtPlugin("$dottyOrganization" % "$sbtDottyName" % "$sbtDottyVersion")""")
997-
Seq(defaultIDEConfig, dottyPluginSbtFile)
998+
Seq(buildSbtFile, dottyPluginSbtFile)
998999
},
9991000
compile in Compile := Def.task {
10001001
val workingDir = baseDirectory.value

vscode-dotty/package-lock.json

Lines changed: 14 additions & 60 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vscode-dotty/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,11 @@
8484
"scala-lang.scala"
8585
],
8686
"dependencies": {
87-
"child-process-promise": "^2.2.1",
87+
"promisify-child-process": "^2.1.2",
8888
"compare-versions": "^3.4.0",
8989
"vscode-languageclient": "^5.1.0",
90-
"vscode-languageserver": "^5.1.0"
90+
"vscode-languageserver": "^5.1.0",
91+
"vscode-jsonrpc": "4.0.0"
9192
},
9293
"devDependencies": {
9394
"@types/compare-versions": "^3.0.0",

0 commit comments

Comments
 (0)