scalacenter / scastie

An interactive playground for Scala
https://scastie.scala-lang.org
Apache License 2.0
432 stars 103 forks source link

Autocomplete #517

Closed vincenzobaz closed 1 year ago

vincenzobaz commented 3 years ago

To get started https://github.com/scalacenter/scastie/search?q=autocomplete and #330

He-Pin commented 2 years ago

refs: https://github.com/scalacenter/scastie/issues/602 duplicated

julienrf commented 2 years ago

I think the best path forward would be to upgrade to CodeMirror 6, which does support LSP (see https://github.com/furqansoftware/codemirror-languageserver), which could communicate to the build server started by scastie. A challenge will be to keep the build server live (currently, we keep a pool of sbt instances live, but we kill them when a user works on a code snippet that uses a different build configuration). Also, to reduce the load on the server, IDE features should be triggered only if explicitly requested (so, not on every key stroke).

A tentative roadmap would be:

Any other idea?

(an alternative code editor might be Theia, or maybe VS Code / Monaco itself if we could make it more lightweight)