From 3c0acf7327fc270b708c329f38455e01041cec8a Mon Sep 17 00:00:00 2001 From: Chris Kipp Date: Tue, 30 May 2023 18:59:47 +0200 Subject: [PATCH] docs(contributing): show an example of how to switch your build server This is a follow-up from the comment [here](https://github.com/lampepfl/dotty/pull/17585#issuecomment-1568475370) and just adds a bit more details about making sure you import the project correctly. [skip community_build] --- .../_docs/contributing/setting-up-your-ide.md | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/docs/_docs/contributing/setting-up-your-ide.md b/docs/_docs/contributing/setting-up-your-ide.md index 327fa3d1a400..3bb7d329d50c 100644 --- a/docs/_docs/contributing/setting-up-your-ide.md +++ b/docs/_docs/contributing/setting-up-your-ide.md @@ -22,19 +22,20 @@ sbt:scala3> projects ... ``` -These duplicated projects can be confusing and cause issues in IDEs. +These duplicated projects can be confusing and cause issues in IDEs, so it's +import to import the project in a specific way depending on your editor. ### Metals When using Metals, the `-bootstrapped` projects are not exported by default. Normally this is fine, but if you're working on certain modules like `scaladoc` you'll actually want these modules exported. In order to achieve this you'll -first want to ensure you're using `sbt` as your build server instead of the -default Bloop. You can achieve this with the `Metals: Switch Build Server` -command and then choosing sbt. Once you do this, you'll want to find and change -the following under `commonBootstrappedSettings` which is found in the -[`Build.scala`](https://github.com/lampepfl/dotty/blob/main/project/Build.scala) -file. +want to make sure you do two things: + +1. You'll want to find and change the following under + `commonBootstrappedSettings` which is found in the + [`Build.scala`](https://github.com/lampepfl/dotty/blob/main/project/Build.scala) + file. ```diff @@ -42,6 +43,13 @@ file. + bspEnabled := true, ``` +2. Set `sbt` as your build server instead of the default, Bloop. You can achieve + this with the `Metals: Switch Build Server` command and then choosing sbt. In + VSCode, this looks like this: + +![bsp-switch](https://user-images.githubusercontent.com/777748/241986423-0724ae74-0ebd-42ef-a1b7-4d17678992b4.png) + + ### IntelliJ In IntelliJ IDEA, we recommend importing the dotty codebase through BSP, then