|
| 1 | +--- |
| 2 | +layout: doc-page |
| 3 | +title: "IDE support for Dotty" |
| 4 | +--- |
| 5 | + |
| 6 | +Dotty comes built-in with the Dotty Language Server, an implementation of the |
| 7 | +[Language Server Protocol](https://github.com/Microsoft/language-server-protocol), |
| 8 | +which means that any editor that implements the LSP can be used as a Dotty IDE. |
| 9 | +Currently, the only IDE we officially support is |
| 10 | +[Visual Studio Code](https://code.visualstudio.com/). |
| 11 | + |
| 12 | +Prerequisites |
| 13 | +============ |
| 14 | +To use this in your own Scala project, you must first get it to compile with |
| 15 | +Dotty, please follow the instructions at https://github.com/lampepfl/dotty-example-project |
| 16 | + |
| 17 | +Usage |
| 18 | +===== |
| 19 | +1. Install [Visual Studio Code](https://code.visualstudio.com/). |
| 20 | +2. Make sure `code`, the binary for Visual Studio Code, is on your `$PATH`, this |
| 21 | + is the case if you can start the IDE by running `code` in a terminal. |
| 22 | +3. In your project, run: |
| 23 | +```shell |
| 24 | +sbt launchIDE |
| 25 | +``` |
| 26 | + |
| 27 | +Status |
| 28 | +====== |
| 29 | + |
| 30 | +## Fully supported features: |
| 31 | +- Typechecking as you type to show compiler errors/warnings |
| 32 | +- Type information on hover |
| 33 | +- Go to definition (in the current project) |
| 34 | +- Find all references |
| 35 | + |
| 36 | +## Partially working features: |
| 37 | +- Completion |
| 38 | +- Renaming |
| 39 | +- Go to definition in external projects |
| 40 | + |
| 41 | +## Unimplemented features: |
| 42 | +- Documentation on hover |
| 43 | +- Formatting code (requires integrating with scalafmt) |
| 44 | +- Quick fixes (probably by integrating with scalafix) |
| 45 | + |
| 46 | +## Current limitations, to be fixed: |
| 47 | +- Projects should be compiled with sbt before starting the IDE, this is |
| 48 | + automatically done for you if you run `sbt launchIDE`. |
| 49 | +- Once the IDE is started, source files that are not opened in the IDE |
| 50 | + should not be modified in some other editor, the IDE won't pick up |
| 51 | + these changes. |
| 52 | +- Not all compiler errors/warnings are displayed, just those occuring |
| 53 | + during typechecking. |
| 54 | + |
| 55 | + |
| 56 | +Feedback |
| 57 | +======== |
| 58 | +Please report issues on https://github.com/lampepfl/dotty/issues, |
| 59 | +you can also come chat with use on the |
| 60 | +[Dotty gitter channel](https://gitter.im/lampepfl/dotty)! |
0 commit comments