talira

Scala language server with rich IDE features

open sourceApache-2.0self-hostablefree

Metals is the language server for Scala, giving editors IDE features through the Language Server Protocol: diagnostics from compiling on save, go to definition into project sources and Scala or Java dependencies, completions (including implementing interfaces and generating exhaustive matches), hover types, signature help, find references and fuzzy symbol search. You open a directory and import the build, and it supports sbt, Gradle, Maven and Mill through the Bloop build server, whose hot incremental compilation reports errors quickly. It works in VS Code, Vim and Neovim, Sublime Text, Emacs, Helix and other LSP editors. Part of the Scalameta project, Apache-2.0 licensed.

Problems it solves

  • IDE features for Scala in VS Code, Vim or Emacs without IntelliJ
  • see Scala compile errors in my editor as I save
  • go to definition and find references across a Scala project and its libraries
  • Scala completions and type information on hover in a lightweight editor
  • import an sbt, Gradle, Maven or Mill Scala build into my editor

Features

  • diagnostics from compiling on file save
  • go to definition in project sources and Scala/Java dependencies
  • completions, including implementing interfaces and exhaustive matches
  • hover (type at point) and signature help
  • find references and fuzzy symbol search
  • sbt, Gradle, Maven and Mill support through Bloop
  • editors: VS Code, Vim, Neovim, Sublime Text, Emacs, Helix and other LSP clients

Alternatives

The same job

These do what Metals does.

  1. IntelliJ IDEA The Java and Kotlin IDE for you and your agents
  2. rust-analyzer Bringing a great IDE experience to the Rust programming language
  3. clangd clangd understands your C++ code and adds smart features to your editor
  4. gopls The language server for Go

Compare Metals with the top 3