|
1 | | -# Coq LSP <img align="right" height="42" src="./etc/img/inria-logo.png"/> <!-- omit in toc --> |
| 1 | +# Rocq LSP <img align="right" height="42" src="./etc/img/inria-logo.png"/> <!-- omit in toc --> |
2 | 2 |
|
3 | 3 | [![Github CI][ci-badge]][ci-link] |
4 | 4 |
|
5 | | -`coq-lsp` is a [Language |
6 | | -Server](https://microsoft.github.io/language-server-protocol/) for the [Rocq |
7 | | -Prover](https://coq.inria.fr). It implements the |
8 | | -[LSP](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/) protocol, with custom [extensions](./etc/doc/PROTOCOL.md), including the [petanque](./petanque) |
9 | | -protocol, designed for low-latency interaction with Rocq, particularly suited for AI and |
10 | | -Software Engineering applications. |
| 5 | +`coq-lsp` is a [Language Server](https://microsoft.github.io/language-server-protocol/) for the [Rocq Prover](https://coq.inria.fr). It provides a single server that implements: |
| 6 | + |
| 7 | +- the [LSP](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/) |
| 8 | + protocol, with custom [extensions](./etc/doc/PROTOCOL.md) |
| 9 | +- the [petanque](./petanque) protocol, designed for low-latency interaction with |
| 10 | + Rocq, idel for AI and software engineering applications |
| 11 | +- the [MCP](https://modelcontextprotocol.io/) protocol (upcoming), an open |
| 12 | + protocol that standardizes how applications provide context to LLMs |
11 | 13 |
|
12 | 14 | **Key [features](#Features)** of `coq-lsp` are: continuous, incremental document |
13 | 15 | checking, real-time interruptions and limits, programmable error recovery, |
14 | | -literate Rocq/Markdown/LaTeX document support, multiple workspaces, positional |
15 | | -goals, information panel, performance data, extensible command-line compiler, |
16 | | -a plugin system, and more. |
| 16 | +literate Markdown and LaTeX document support, multiple workspaces, positional |
| 17 | +goals, information panel, performance data, completion, jump to definition, |
| 18 | +extensible command-line compiler, a plugin system, and more. |
| 19 | + |
| 20 | +`coq-lsp` is built on **Flèche**, a new document checking engine for formal |
| 21 | +documents based on our previous work on |
| 22 | +[SerAPI](https://github.com/ejgallego/coq-serapi/) and |
| 23 | +[jsCoq](https://github.com/jscoq/jscoq). |
| 24 | + |
| 25 | +Designed for interactive use and web-native environments, Flèche is extensible |
| 26 | +and supports [advanced tooling integration](#-a-platform-for-research) and |
| 27 | +capabilities beyond standard Rocq. |
17 | 28 |
|
18 | | -See the [User Manual](./etc/doc/USER_MANUAL.md) and the [General |
19 | | -Documentation Index](./etc/doc/) for more details. |
| 29 | +See the [User Manual](./etc/doc/USER_MANUAL.md) and the [General Documentation Index](./etc/doc/) for more details. |
20 | 30 |
|
21 | 31 | This repository also includes the `coq-lsp` [Visual Studio |
22 | 32 | Code](https://code.visualstudio.com/) editor extension for the [Rocq Proof |
23 | | -Assistant](https://coq.inria.fr), and a few other components, see our |
24 | | -[contributing guide](#contributing) for more information. Experimental support |
| 33 | +Assistant](https://coq.inria.fr), and a few other components. See our |
| 34 | +[contributing guide](#contributing) for more information. Support |
25 | 35 | for [Emacs](#emacs), [Vim](#vim) and [Neovim](#neovim) is also available in |
26 | 36 | their own projects. |
27 | 37 |
|
28 | 38 | **Quick Install**: |
29 | 39 |
|
30 | | - - **🐧 Linux / 🍎 macOs / **🪟 Windows:**:** |
| 40 | + - **🐧 Linux / 🍎 macOs / 🪟 Windows:** |
31 | 41 | ``` |
32 | 42 | $ opam install coq-lsp && code --install-extension ejgallego.coq-lsp |
33 | 43 | ``` |
34 | 44 |
|
35 | | - - **🪟 Windows:** (alternative method) Download the [Coq Platform installer](#-server) |
| 45 | + - **🪟 Windows:** (alternative method) |
36 | 46 |
|
37 | | -Try it online ☕☕ (experimental) https://github.dev/ejgallego/hello-rocq |
| 47 | + Download the [Coq Platform installer](#-server) |
38 | 48 |
|
39 | | -`coq-lsp` aims to deliver a modern, seamless experience for interactive theorem |
40 | | -proving, while serving as a robust platform for research and integration with |
41 | | -other tools. |
| 49 | + - **🦄 Emacs**: |
42 | 50 |
|
43 | | -`coq-lsp` is built on **Flèche**, a new document checking engine for |
44 | | -formal documents developed from the lessons of |
45 | | -[SerAPI](https://github.com/ejgallego/coq-serapi/) and |
46 | | -[jsCoq](https://github.com/jscoq/jscoq). Flèche is optimized for |
47 | | -interactive use, [SerAPI-like tooling integration](#-a-platform-for-research), |
48 | | -and web-native environments, offering capabilities beyond standard Rocq. |
| 51 | +```elisp |
| 52 | + (use-package rocq-mode |
| 53 | + :vc (:url "https://codeberg.org/jpoiret/rocq-mode.el.git" |
| 54 | + :rev :newest) |
| 55 | + :mode "\\.v\\'" |
| 56 | + :hook |
| 57 | + (rocq-mode . rocq-follow-viewport-mode) |
| 58 | + (rocq-mode . rocq-auto-goals-at-point-mode)) |
| 59 | +``` |
| 60 | + |
| 61 | + - **☕ Try it online ☕ (experimental)**: |
49 | 62 |
|
50 | | -`coq-lsp` supports 🐧 Linux, 🍎 macOS, 🪟 Windows , and ☕ JavaScript (Node/Browser) |
| 63 | + https://github.dev/ejgallego/hello-rocq |
51 | 64 |
|
52 | 65 | ## Table of Contents <!-- omit in toc --> |
53 | 66 |
|
@@ -257,10 +270,11 @@ ready. |
257 | 270 |
|
258 | 271 | ### 🏘️ Supported Coq Versions |
259 | 272 |
|
260 | | -`coq-lsp` supports Coq 8.20, Coq 8.19, Coq 8.18, Coq 8.17, and Coq's `master` |
261 | | -branch. Code for each Coq version can be found in the corresponding branch. |
| 273 | +`coq-lsp` supports Rocq 9.0, Coq 8.20, Coq 8.19, Coq 8.18, Coq 8.17, and Coq's |
| 274 | +`master` branch. Code for each Coq version can be found in the corresponding |
| 275 | +branch. |
262 | 276 |
|
263 | | -We recommended using Coq 8.19 or `master` version. For other Coq versions, we |
| 277 | +We recommended using Rocq 9.0 or `master` version. For other Coq versions, we |
264 | 278 | recommend users to install the custom Coq tree as detailed in [Coq Upstream |
265 | 279 | Bugs](#coq-upstream-bugs). |
266 | 280 |
|
@@ -308,10 +322,8 @@ guide](./CONTRIBUTING.md) |
308 | 322 |
|
309 | 323 | ### 🦄 Emacs |
310 | 324 |
|
311 | | -- An experimental configuration for `lsp-mode` has been provided by Arthur |
312 | | - Azevedo de Amorim, supporting goal display, see [the Zulip |
313 | | - thread](https://coq.zulipchat.com/#narrow/stream/329642-coq-lsp/topic/coq-lsp.20under.20Emacs.2E) |
314 | | - for more information. |
| 325 | +The official Rocq Emacs mode is https://codeberg.org/jpoiret/rocq-mode.el , |
| 326 | +maintained by Josselin Poiret with contributions by Arthur Azevedo de Amorim. |
315 | 327 |
|
316 | 328 | ### ✅ Vim |
317 | 329 |
|
|
0 commit comments