Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document BSP manual setup #3989

Merged
merged 2 commits into from
Nov 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions docs/modules/ROOT/pages/cli/installation-ide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,17 @@ as a drop-in replacement for `./mill` that supports running on all major platfor

:link-metals: https://scalameta.org/metals/

Mill supports IntelliJ and VSCode, both via the standard
https://build-server-protocol.github.io/[Build Server Protocol]
Mill supports IntelliJ and VSCode and in general any client of the standard
https://build-server-protocol.github.io/[Build Server Protocol (BSP)].

To prepare your project for IDEs, and in general any BSP client, you can run this command to generate the BSP configuration files:

[source,bash]
----
./mill mill.bsp.BSP/install
----

Your IDEs may already auto-detect the Mill project and run this command on behalf of you, when opening/importing the project.

=== IntelliJ

Expand Down Expand Up @@ -138,7 +147,7 @@ https://marketplace.visualstudio.com/items?itemName=scalameta.metals[Metals VSCo
installed. This is necessary as Mill build files are written in Scala,
even if you are using it to build a Java project.

NOTE: Mill in VSCode only supports Java and Scala. Kotlin users should use IntelliJ
NOTE: Mill in VSCode only supports Java and Scala. Kotlin users are advised to use the free IntelliJ IDEA Community Edition

Once you have the language server installed, you can ask VSCode to open any folder
containing a Mill `build.mill` file, and VSCode will ask you to import your
Expand All @@ -154,6 +163,10 @@ those updates by opening the "BSP" tab and clicking the "Refresh" button

image::basic/VSCodeRefresh.png[]

=== Other Editors / Metals

A lot of other editors may work too, since {link-metals}[Metals], the Language Server for Scala has built-in support for BSP. See the <<_ide_support,general instructions>> above.

=== Debugging IDE issues

Mill's BSP IDE integration writes to a log file under
Expand Down
Loading