A Zero to Hero Vim + Metals Setup

Chris Kipp

2020 Typelevel Summit

About Me

Grew up in WI on a farm

Studied International

Relations

Now based in the

Netherlands

Software Engineer

at Lunatech Labs

Enjoy working on

tooling & minimal tech

Goals

  • Convince everyone here to switch to Vim and Metals
  • Show that Vim is not only a viable editor for Scala,  but is well supported and feature rich
  • Show how fast it is to get up and running with Metals + Vim
  • Show a bit how Metals accounts for difference clients

Vim isn't going anywhere

2019

2018

2017

Stack Overflow Developer Surveys

2018 Scala Developer Survey

2019 Scala Developer Survey

Metals isn't going anywhere

LSP

  • neoclide / coc.nvim (9.1K ★ - Node)

  • dense-analysis / ale (9.1K ★ - Vimscript)

  • autozimu / LanguageClient-neovim (2.7K ★ - Rust)
  • prabirshrestha / vim-lsp (1.4K ★ - Vimscript)

  • natebosch / vim-lsc (414 ★ - Vimscript)

  • neovim / nvim-lsp (563 ★ - Lua)

scalameta / coc-metals

scalameta / coc-metals

  1. Plug 'neoclide/coc.nvim', {'branch': 'release'}
  2. Paste recommended mappings into your .vimrc

    1. nmap <leader>rn <Plug>(coc-rename)
  3. :CocInstall coc-metals

With the assumption you have Node and Java Installed

coc-metals / importing builds

coc-metals / code actions

coc-metals / tree view protocol

coc-metals / worksheets

coc-metals / configuration

coc-metals / commands

coc-metals / doctor

coc-metals / run - debug

Via puremourning / vimspector

The future

  • Continued (attempted) parity with VS Code + Metals
  • Built in LSP Client for Neovim
  • Onivim2 release
  • Updated Scala syntax highlighting for Vim

Thank you

@ckipp01