I am pleased by the new presentation compiler design, but I think it is a mistake to design an LSP server from scratch, bless it above all others, and couple it to the compiler release cycles. This will kill off ensime and its community, whilst reducing the mission of the LSP-WG to a tactical solution.
If your goal is an excellent beginner experience, e.g.:
- user installs the Scala plugin from the vscode / atom / etc marketplace
- prompt to install the JVM and sbt using the OS package manager (automated when approved)
- prompt to setup an example project that will
- download an example project using g8
- opens “my first scala program” source file annotated with documentation, showing off language features and how to build / run the code.
- Completion, red squigglies, and classpath search all work here.
We can do all of this on vscode with ensime, with only a small amount of work. The reason nobody wants to do this as a volunteer is because it means having to deal with angry and confused beginners. The support needs to be commercially funded. If this is something that Lightbend or the Scala Center wants to fund, I can show them what needs to be done on the ensime side to make it a reality.
The point is that we do not need an LSP to be baked into the standard distribution to work like this. If we throw away everything in ensime, and collaborations in LSP-WG, and start from scratch then EPFL will just be rediscovering all the same problems we’ve been facing and solving in the wild. I wrote up my recommendations for the LSP-WG and they are equally applicable to Dotty’s LSP http://ensime.org/lsp-wg/
Everybody involved with LSP met at Scalasphere, we discussed the more general problem of service discovery. Although this is not a conclusion of the LSP-WG, a new architectural design was proposed in https://github.com/ensime/ensime-server/issues/1941 that solves all of these problems.
As far as I can tell, Dotty’s LSP will not be capable of supporting anywhere near the wide range of usecases that ensime has been designed for (multiple projects open at one time, multi-million line corporate projects, editor independent, build tool independent).
I expected the Dotty LSP to be a proof of concept, to help design the new presentation compiler and TASTY depickler. I did not expect this to become what it has become and I’m concerned that the Dotty LSP will kill off community innovation.
In addition, please note that Dotty’s LSP uses the Eclipse License, which is explicitly incompatible with the GPL and therefore ENSIME.