package menhir-lsp
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=ba5f24c9f62b2c3ce81b7f0d1a4b1c4d
sha512=52fe492e2db532dba48afd4d84046872c9e62d2cfef18d6c53e5dc3bd519c1f20a5efd07bb93ab45e279c92d5aee0cc6ca108df2c9d25d4f5838ed834c947439
doc/README.html
menhir-lsp
menhir-lsp is a Language Server for the OCaml dialects Menhir and ocamllex. Its goal is to provide rich IntelliSense features in .mll and .mly files. A client for VS Code is available as a VS Code extension.
Capabilities
Installation & Usage
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 spawn the server and communicate with it automatically.
For other editors, please refer to their documentation on how to register a client.
Manual installation
Run these commands if the opam package is not working or you want to hack on the server.
git clone https://github.com/dalps/menhir-lsp && cd menhir-lsp
opam install .Development notes
The server code is based on the Linol Lwt template.
It also reuses the Menhir grammar that parses Menhir itself to get the AST representation of the document annotated with locations. Unfortunately the AST offered by the Menhir SDK lacks location annotations for various kinds of symbols, so I had to resorted to tweaking the original parser to get things working.
Issues or PRs for missing features, clients for other editors or any bug / improvement are welcome.
License
GNU General Public License v2.0 only