Page
Library
Module
Module type
Parameter
Class
Class type
Source
menhir-lsp is a Language Server for Menhir, an LR(1) parser generator developed by Inria. The server offers basic IntelliSense features for Menhir grammars (files with the .mly extensions) requested by a client hosted in a text editor. A client for VS Code is conveniently provided as a VS Code extension.
Requests handled by the server:
Installing this server is a simple as:
opam install menhir-lspThen, in order to get IntelliSense for your grammars in VS Code, you need to install the client, available in the VS Code Marketplace. The client will run and communicate with the server automatically.
The server code is based on the Linol Lwt template.
It also reuses the Menhir grammar that parses Menhir itself to get an AST representation of the document annotated with locations. I've tried working with the Menhir SDK, but the cmly representation of the grammar doesn't have location annotations for the various symbols, which are essential in implementign most LSP features, so vendoring the original code is the best I could come up with.
Please open an issue or a PR for missing features, ideas for improvement, other editor support, general bugs or any other matter.
GNU General Public License v2.0 only