Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.
/ atom-ide-scala Public archive

:atom: Scala & Dotty support for Atom IDE (🧟‍♂️ zombie repo)

License

Notifications You must be signed in to change notification settings

laughedelic/atom-ide-scala

Repository files navigation

Atom IDE Scala language client

Scala & Dotty support for Atom IDE, powered by Metals, Dotty and Ensime language servers.

(The screenshot above is outdated, the set of features depends on the language server you're going to use)

🚧 WORK IN PROGRESS 🚧

The project is in active development and may have some rough edges. You are welcome to try it out and provide any feedback in the Gitter chat or Github issues.

This plugin is written in Scala.js, so if you are a Scala developer looking for better development experience in Atom, you're encouraged to contribute. Check the contributing guide and open issues especially the ones marked with help wanted label.

The work of this plugin is to launch the language server and wire communication with it to the Atom IDE services. Most of the interesting stuff is happening on the server side, so check also the scalameta/metals project.

During development some reusable parts were split into separate repos:

  • scalajs-atom-api: Scala.js facades for Atom-related APIs (including atom-languageclient)
  • sbt-atom-package: an sbt plugin wraping apm and simplifying development of Scala.js-based Atom plugins

Installation

First, you need to install language-scala for basic Scala syntax highlighting. Then you can open the package page and click the green Install button.

Or you can run this command:

apm install language-scala ide-scala

On the first launch it will automatically install its dependencies if needed:

Usage

This plugin can work with different Scala language servers: Metals for Scala 2 projects or Dotty for Scala 3 projects. The plugin tries to determine which server to launch depending on the project setup.

Plugin gets activated only when you open a .scala file.

⚠️ Notice that when you close all tabs with Scala files, language server will be stopped. See atom-languageclient#141 for discussion on this behavior.

Metals project setup is completely automatic: when you open a new project, it will ask you if you want to import the build definition. If something goes wrong or doesn't work as expected, run Metals Doctor through the command palette.

More details on the Metals website.

Setup a Dotty sbt project and run sbt configureIDE in it, then just open the project in Atom.

Official instructions may tell you to run launchIDE in sbt, but this command can only launch VS Code, so just use configureIDE instead and open the project in Atom.

🚧 Ensime support is removed for now because the LSP implementation of the Ensime server is quite unstable at the moment and Ensime is not actively maintained. So even if the client works well, the server might be broken and you won't see any features working. 🚧

Follow ensime-server#1951 for more information and get involved if you want to use Ensime LSP server.