{"id":44003357,"url":"https://github.com/dalps/menhir-lsp","last_synced_at":"2026-04-13T13:05:08.052Z","repository":{"id":329346171,"uuid":"1111267551","full_name":"dalps/menhir-lsp","owner":"dalps","description":"Language server and VS Code extension for Menhir and Ocamllex","archived":false,"fork":false,"pushed_at":"2026-01-31T00:33:34.000Z","size":397,"stargazers_count":9,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-31T03:05:54.302Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"OCaml","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dalps.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-06T15:56:08.000Z","updated_at":"2026-01-30T10:51:07.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/dalps/menhir-lsp","commit_stats":null,"previous_names":["dalps/menhir-lsp"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/dalps/menhir-lsp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalps%2Fmenhir-lsp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalps%2Fmenhir-lsp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalps%2Fmenhir-lsp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalps%2Fmenhir-lsp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dalps","download_url":"https://codeload.github.com/dalps/menhir-lsp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalps%2Fmenhir-lsp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29194560,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T12:38:28.597Z","status":"ssl_error","status_checked_at":"2026-02-07T12:38:23.888Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-07T13:05:40.394Z","updated_at":"2026-02-07T13:05:41.612Z","avatar_url":"https://github.com/dalps.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Menhir LSP\n\n`menhir-lsp` is a Language Server for the OCaml dialects [Menhir](https://fpottier.gitlabpages.inria.fr/menhir/) and [Ocamllex](https://ocaml.org/manual/5.4/lexyacc.html). Its goal is to provide first-class language support for their syntaxes in client editors. A [client](client/) for VS Code is available through a [VS Code extension](https://marketplace.visualstudio.com/items?itemName=dalps.menhir-lsp-client).\n\n## Capabilities\n\n* [Find References](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_references) \n* [Jump to Definition](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_definition)\n* [Hover](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_hover)\n* [Document Symbols](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_documentSymbol)\n* [Completion](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_completion)\n* [Code Actions](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_codeAction)\n* [Rename](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_rename)\n* [Selection Range](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_selectionRange)\n\n## Installation \u0026 Usage\n\nInstall the server through opam:\n\n```\nopam install menhir-lsp\n```\n\nThe server alone doesn't do much, to do its job it needs a client that talks the Language Server Protocol running in your editor. If you use VS Code proceed by installing [the Menhir extension](https://marketplace.visualstudio.com/items?itemName=dalps.menhir-lsp-client), then open a document with the `.mly` or `.mll` file extension. The LSP client will launch the server and communicate with it automatically.\n\nFor other editors, please refer to their documentation on how to register an LSP client.\n\n### Manual installation\n\nRun these commands if you encounter a problem with the opam package or you'd like to hack on the server:\n\n```\ngit clone https://github.com/dalps/menhir-lsp.git \u0026\u0026 cd menhir-lsp\ndune install\n```\n\nYou can also download a copy of the binary from the [lateset release](https://github.com/dalps/menhir-lsp/releases/latest) on GitHub. Put it under a folder that's included in your `PATH` and the client should be able to run it as well.\n\n## Development\n\nThe server's code lives in the [`bin`](bin/) directory. It relies on [Linol](https://github.com/c-cube/linol), an OCaml package that simplifies the development of Language Servers, and the [visitors](https://ocaml.org/p/visitors/latest) OCaml syntax plugin, for automating AST traversals.\n\nIt is also based on the original codebases of both [Menhir](https://gitlab.inria.fr/fpottier/menhir) and [Ocamllex](https://github.com/ocaml/ocaml/tree/trunk/lex), whose parsers I [modified](/vendor/) in order to annotate their ASTs with source locations and make error recovery possible.\n\nAdditional references: [ocaml-lsp](https://github.com/ocaml/ocaml-lsp), [atd-lsp](github.com/ahrefs/atd-lsp), [catala-lsp](https://github.com/CatalaLang/catala-language-server). These were huge help material for implementing common LSP tasks in OCaml.\n\n### Editor support\n\nCurrently 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 editor.\n\nIssues for bugs / missing features are welcome.\n\n## License\n\nGNU General Public License v2.0 only","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdalps%2Fmenhir-lsp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdalps%2Fmenhir-lsp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdalps%2Fmenhir-lsp/lists"}