Page
Library
Module
Module type
Parameter
Class
Class type
Source
menhir-lsp is a Language Server for the OCaml dialects Menhir and ocamllex. Its goal is to provide rich IntelliSense in .mly and .mll files in client editors. A client for VS Code is available as a VS Code extension.
Installing the server is a simple as:
opam install menhir-lspThe server alone doesn't do much, to do its job it needs a client that talks the LSP running in your editor. If you use VS Code proceed by installing the Menhir extension, then open an .mly or .mll document. The LSP client will launch the server and communicate with it automatically.
For other editors, please refer to their documentation on how to register a client.
Run these commands if the opam package is down or you want to hack on the server.
git clone https://github.com/dalps/menhir-lsp && cd menhir-lsp
opam install .The server's code depends on Linol, an OCaml package that simplifies the development of Language Servers.
It is also based on the source codes of both Menhir and ocamllex, modified so their parsers stores location annotations in the AST and doesn't exit the server's process when a syntax error occurs.
Issues or PRs for missing features, clients for other editors or any bug / improvement are welcome.
GNU General Public License v2.0 only