Skip to main content
Metals v2 works with Neovim through nvim-metals, a Lua plugin that integrates Metals with Neovim’s built-in LSP support.
The nvim-metals repository is the primary reference for installation and configuration. This page covers only the Metals v2-specific setup.

Prerequisites

  • Neovim v0.11.x or newer
  • Coursier installed locally

Configuration

Follow the nvim-metals installation guide, then add the serverVersion setting to use Metals v2:
Latest version: 2.0.0-M2

Required VM Options

Metals v2 requires JVM options for JDK internals access. If PR #767 has been merged, these are set automatically. Otherwise, add them manually:

nvim-metals on GitHub

Full documentation, examples, and source code