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:
- Put
m2-lson yourPATH(see Install). - Tell the editor to run
m2-ls(it talks over stdio) for.m2files. - 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.
| Editor | Guide |
|---|---|
| VS Code | VSCode extension |
| Neovim | Nvim |
| Emacs | Emacs |
| Helix, Zed, others | not written up yet. The three steps above are all there is to it |