Skip to content

ed1621/nvim-metals

 
 

Repository files navigation

nvim-metals logo

nvim-metals

nvim-metals is a Lua plugin built to provide a better experience while using Metals, the Scala Language Server, with Neovim's built-in LSP support. This plugin provides the necessary commands you'll need to develop with nvim and Metals. This extension also implements many of the custom Metals LSP extensions that will give you a much richer experience than just using Metals with the default nvim-lspconfig setup, as well as automatically setting all of the correct init_options, and offering some integrations with other projects such as nvim-dap and Telescope.

link to gitter link to help docs

Prerequisites

  • Before you get started you need to ensure that you are using the latest stable version of nvim, v.0.5.x.
  • Ensure Coursier is installed on your machine. nvim-metals uses Coursier to download and update Metals.
  • Ensure that you have mappings created for functionality that you desire. By default methods for things like goto definition, find references, etc are there, but not automatically mapped. You can find a minimal example configuration here.

Installation

NOTE: This plugin works without needing to install neovim/nvim-lspconfig. If you have it installed for other languages, that's not a problem, but make sure you do not have Metals configured through nvim-lspconfig while using this plugin. If you have metals setup registered with nvim-lspconfig, you'll want to remove it.

nvim-metals is just a plugin installed like any other Neovim plugin. For example if using packer:

use({'scalameta/nvim-metals'})

Getting started

To get started with nvim-metals, please read :help nvim-metals. This will give you a thorough overview of the setup and settings.

Settings, Commands, and Options

To view all of the available commands, check out :help metals-commands in the help docs. Similarly, to see the available configuration options, check out :help metals-options, and :help metals-settings for settings.

NOTE: You can find an example of a minimal configuration showing how to set various settings and options here.

Integrations

To see the full details on the available configurations, checkout out :help metals-integrations. The currently available integrations are:

About

A WIP Metals plugin for Nvim

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Lua 98.6%
  • Vim Script 1.3%
  • Makefile 0.1%