The IDE support in Dotty was developed to meet the following requirements:
- It should be based on primitives that can be reused to develop other interactive tools, like REPLs.
- It should not be tied to a specific editor.
- It should be as easy to install and use as possible.
This lead us to develop the following components:
- A set of APIs in the compiler designed for interactive usage.
- The Dotty Language Server, an implementation of the Language Server Protocol
- A plugin for the Visual Studio Code IDE to launch the Dotty Language Server, as well as a plugin for the sbt build tool to configure and run an IDE
In this talk, I’ll describe how these components were developed. I will also describe our future plans such as:
- A powerful build tool integration based on the new Build Server Protocol
- Debugging support (including evaluation Scala expressions at runtime) based on the Java Debug Server
Ultimately, we would like the compiler to become much better at helping you write correct programs instead of just complaining when you make mistakes.