Skip to content

Commit ea7ab3e

Browse files
authored
Merge pull request #270 from ckipp01/ide
docs: fix typos and clarify a few things on the ide page
2 parents 187e95d + 94638de commit ea7ab3e

File tree

1 file changed

+28
-16
lines changed

1 file changed

+28
-16
lines changed

website/docs/guides/ide.md

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,24 @@ IDE support is under development mainly because changes needs to be done in both
88
:::
99

1010

11-
Scala CLI currently integrates with build server using [BSP protocol](https://build-server-protocol.github.io/). At this moment Scala CLI is not automatically detected so we need to use [Build Server Discovery](https://build-server-protocol.github.io/docs/server-discovery.html) from BSP protocol, namely generate connection details file (`.bsp/scala-cli.json`).
11+
Scala CLI currently Scala integrates with IDEs using [BSP protocol](https://build-server-protocol.github.io/). At this moment Scala CLI is not automatically detected so we need to use [Build Server Discovery](https://build-server-protocol.github.io/docs/server-discovery.html) from the BSP protocol. This is the main reason we create the BSP connection details file (`.bsp/scala-cli.json`) for your editor to pick up.
1212

1313
:::note
14-
None of the following commands was run: `compile`, `run`, `test`, `setup-ide` or previously generated connection detail file was deleted, IDE will not use Scala CLI to configure workspace.
15-
16-
In such case, just run one of the commands above commands to recreate connection details file
14+
If none of the following commands were ran: `compile`, `run`, `test`,
15+
`setup-ide` or a `.bsp/scala-cli.json` file has yet to be created (or was deleted), your editor
16+
won't pick up scala-cli as a build server. In that case, simply run one of the
17+
those commands and the file will be created.
1718
:::
1819

20+
Since Scala CLI has a command-line-first approach that is reflected in the IDE
21+
integrations. By default, Scala CLI stores options passed to the last `compile`,
22+
`run` or `test` commands and use those options to configure your IDE.
1923

20-
Since Scala CLI has a command-line-first approach and it is reflected in IDE integration. By default, Scala CLI stores options passed to last `compile`, `run` or `test` and use those options to configure IDE.
21-
22-
For more control we also expose [`setup-ide` command](../commands/setup-ide.md) that allows to fine tune options passed to IDE.
24+
For more control we also expose a [`setup-ide` command](../commands/setup-ide.md) that allows to fine tune options passed to IDE.
2325

24-
Once `setup-ide` is used, Scala CLI does not update configuration based on latest command.
26+
Once `setup-ide` is used, Scala CLI does not update configuration based on the latest command.
2527

26-
To enable automatic updates again, remove `.bsp` directory and run `compile`, `run` or `test` to recreate connection details file.
28+
To enable automatic updates again, remove the `.bsp` directory and run `compile`, `run` or `test` to recreate the connection details file (`.bsp/scala-cli.json`).
2729

2830
For now non-local sources are supported. What are non-local sources? Gists, URLs or piped sources.
2931

@@ -32,19 +34,28 @@ Scala CLI was tested with two main IDEs for Scala:
3234
- [Metals](https://scalameta.org/metals/): LSP server for Scala used with [Visual Studio Code](https://code.visualstudio.com/), [Vim](https://www.vim.org/) and many other editors
3335
- [Intelij Idea](https://www.jetbrains.com/idea/) with [Scala Plugin](https://confluence.jetbrains.com/display/SCA/Scala+Plugin+for+IntelliJ+IDEA?_ga=2.54176744.1963952405.1634470110-410935139.1631638301) installed
3436

35-
In ideal world, we would replace the rest of this Guide with something along the lines of: `Scala CLI works within IDEs above as you would expect` however mainly due to how fresh Scala CLI is and also due to our radical approach to the project structure using Scala CLI -powered project to your favourite IDE may not be as amazing as we would like.
37+
In ideal world, we would replace the rest of this Guide with something along the
38+
lines of: `Scala CLI works with all IDEs above as you would expect` however
39+
mainly due to how fresh Scala CLI is and also due to our radical approach to the
40+
project structure using a Scala CLI-powered projects with your favourite IDE may
41+
not be as amazing as we would like to be.
3642

37-
Proper IDE integration is our top priority at this moment.
43+
Proper IDE integration is our top priority at the moment.
3844

3945
## Metals
4046

41-
Once Metals pick up proper project structure then basic features like navigation, diagnostics or code completion should work.
47+
Once Metals picks up proper project structure then basic features like navigation, diagnostics or code completion should work.
4248

43-
Currently release Metals (0.10.7) are not able to pick changes in build structure automatically and this even includes adding new source file. In order for Metals to pick up new files or changes in build structure 'Restart build server' action is needed.
49+
The Current release Metals (0.10.8) is not able to pick changes in the build
50+
structure automatically and this includes adding new source files. In order
51+
for Metals to pick up new files or changes in build structure you'll need to
52+
trigger the 'Restart build server' command.
4453

45-
Main classes and tests are at this moment to recognized in Metals.
54+
Main classes and tests are at this moment not recognized in Metals.
4655

47-
Generally, mainly due to problems with keeping project structure up to date Metals can assists with writing code using Scala CLI, however it cannot be the source of true and we recommend falling back to command line in such cases.
56+
Generally, mainly due to problems with keeping project structure up to date
57+
Metals can assists with writing code while using Scala CLI, but it cannot be the
58+
source of truth and we recommend falling back to command line in such cases.
4859

4960
## IntelliJ
5061

@@ -54,4 +65,5 @@ With IntelliJ, we strongly suggested to placed your sources within a directory (
5465

5566
IntelliJ currently does not automatically pick up changes in project structure so any change in dependencies, compiler options etc. needs manual reload.
5667

57-
Similarly to Metals, currently we do not advise using IntelliJ as a source of truth. We recommend falling back to command line in such cases.
68+
Similarly to Metals, we don't currently advise using Intellij as a source of
69+
truth and we recommend falling back to command line in such cases.

0 commit comments

Comments
 (0)