Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Setting up LSP

m2-ls is a standard language server, so any editor with an LSP client can use it. In VS Code there’s nothing to set up: the extension brings the server along.

Everywhere else, the recipe is the same:

  1. Put m2-ls on your PATH (see Install).
  2. Tell the editor to run m2-ls (it talks over stdio) for .m2 files.
  3. Use the directory with .git (or your package’s root) as the project root.

Settings can be passed either in initializationOptions or as workspace configuration under the m2-ls section. They are in m2-ls settings.

EditorGuide
VS CodeVSCode extension
NeovimNvim
EmacsEmacs
Helix, Zed, othersnot written up yet. The three steps above are all there is to it