package menhir-lsp
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=3bca17c7aeb1ad964c114ab2c06f41f4
sha512=b4e006077d096d950aec1cef8c5dd90d6107ea11b1089423e4b198d9e6de91796cb19a1dc5b325ff93d86a036fff4f40a23a5f823ae56aa05bc99197d754bcec
Description
Implementation of the Language Server Protocol for Menhir and Ocamllex, providing editors with navigation hints and completions in .mly and .mll files.
README
Menhir LSP
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.
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 launch the server and communicate with it automatically.
For other editors, please refer to their documentation on how to register an LSP client.
Manual installation
Run these commands should the opam package not work or you want to hack on the server.
git clone https://github.com/dalps/menhir-lsp && cd menhir-lsp
opam install .Development
The server's code depends on Linol, an OCaml package that simplifies the development of Language Servers.
It is also based on the original code of both Menhir and Ocamllex, whose parsers I modified in order to annotate their ASTs with source locations and make error recovery possible.
Additional references: ocaml-lsp, atd-lsp, catala-lsp. These were huge help material for implementing common LSP tasks in OCaml.
Editor support
Currently only VS Code is supported, but not everyone uses VS Code. If you think this is useful and would like to have menhir-lsp work in your preferred editor, please consider contributing a new client / extension / adapter through a PR. I'm planning to maintain only the VS Code client since that it is my daily, fairly easy to extend, editor.
Issues for bugs / missing features are welcome.
License
GNU General Public License v2.0 only