Skip to content

Commit 7ce2c08

Browse files
committed
Merge pull request #55 from tarides/pre-release-1.2.0
Pre release 1.2.0
2 parents 3d4a1f3 + 7a8e909 commit 7ce2c08

File tree

2 files changed

+66
-8
lines changed

2 files changed

+66
-8
lines changed

CHANGES.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
ocaml-eglot unreleased
1+
ocaml-eglot 1.2.0
22
======================
3+
Tue Apr 15 11:14:03 PM CEST 2025
34

45
- Fix Type-enclosing's buffer update when using `caml-mode` ([#48](https://github.com/tarides/ocaml-eglot/pull/48))
56
- Add `ocaml-eglot-search-definition`, `ocaml-eglot-search-declaration` and alternative functions ([#45](https://github.com/tarides/ocaml-eglot/pull/45))

README.md

Lines changed: 64 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@ client. This tool specifically caters to the OCaml ecosystem by
1010
implementing canonical custom requests and commands exposed by the
1111
[**`ocaml-lsp-server`**](https://github.com/ocaml/ocaml-lsp).
1212

13-
> [!WARNING]
14-
> `ocaml-eglot` is **experimental** and at an early stage
15-
> of development. While we're very happy to collect user feedback.
13+
> [!IMPORTANT]
14+
> `ocaml-eglot` is an **alternative mode** to
15+
> [`merlin`](https://ocaml.github.io/merlin/) which uses
16+
> [`ocaml-lsp-server`](https://github.com/ocaml/ocaml-lsp) (instead of
17+
> `ocamlmerlin`) as the language server. So yes, if you decide to use
18+
> `ocaml-eglot`, `merlin` is no longer needed.
1619
1720
`ocaml-eglot` bridges the gap between generic LSP support and the
1821
**specific needs of OCaml developers**. Its tight coupling with Eglot
@@ -145,6 +148,60 @@ configured in this way:
145148

146149
## Features
147150

151+
Here is the list of commands offered by `ocaml-eglot`, together with
152+
their key binding (you'll find more detailed descriptions and
153+
illustrations of each command in the next section.).
154+
155+
> [!IMPORTANT]
156+
> This section only covers features specific to `ocaml-eglot`,
157+
> however, Eglot offers a large number of _out of the box_ features,
158+
> via LSP (like completion, xref, flymake backend, imenu). To find out
159+
> more, please consult [its user
160+
> manual](https://www.gnu.org/software/emacs/manual/html_mono/eglot.html).
161+
162+
| Command | Default Binding |
163+
| -- | -- |
164+
| `ocaml-eglot-error-next` | <kbd>C-c</kbd> <kbd>C-x</kbd> |
165+
| `ocaml-eglot-error-prev` | <kbd>C-c</kbd> <kbd>C-c</kbd> |
166+
| `ocaml-eglot-find-definition` |<kbd>C-c</kbd> <kbd>C-l</kbd> |
167+
| `ocaml-eglot-find-definition-in-new-window` | |
168+
| `ocaml-eglot-find-definition-in-current-window` | |
169+
| `ocaml-eglot-find-identifier-definition` | |
170+
| `ocaml-eglot-find-identifier-definition-in-new-window` | |
171+
| `ocaml-eglot-find-identifier-definition-in-current-window` | |
172+
| `ocaml-eglot-find-declaration` | <kbd>C-c</kbd> <kbd>C-i</kbd> |
173+
| `ocaml-eglot-find-declaration-in-new-window` | |
174+
| `ocaml-eglot-find-definition-in-current-window` | |
175+
| `ocaml-eglot-find-identifier-declaration` | |
176+
| `ocaml-eglot-find-identifier-declaration-in-new-window` | |
177+
| `ocaml-eglot-find-identifier-declaration-in-current-window` | |
178+
| `ocaml-eglot-find-type-definition` | |
179+
| `ocaml-eglot-find-type-definition-in-new-window` | |
180+
| `ocaml-eglot-find-type-definition-in-current-window` | |
181+
| `ocaml-eglot-infer-interface` | |
182+
| `ocaml-eglot-alternate-file` | <kbd>C-c</kbd> <kbd>C-a</kbd> |
183+
| `ocaml-eglot-hole-next` | |
184+
| `ocaml-eglot-hole-prev` | |
185+
| `ocaml-eglot-jump` | |
186+
| `ocaml-eglot-phrase-next` | <kbd>C-c</kbd> <kbd>C-p</kbd> |
187+
| `ocaml-eglot-phrase-prev` | <kbd>C-c</kbd> <kbd>C-n</kbd> |
188+
| `ocaml-eglot-search` | |
189+
| `ocaml-eglot-search-definition` | |
190+
| `ocaml-eglot-search-definition-in-new-window` | |
191+
| `ocaml-eglot-search-definition-in-current-window` | |
192+
| `ocaml-eglot-search-declaration` | |
193+
| `ocaml-eglot-search-declaration-in-new-window` | |
194+
| `ocaml-eglot-search-declaration-in-current-window` | |
195+
| `ocaml-eglot-document` | <kbd>C-c</kbd> <kbd>C-d</kbd> |
196+
| `ocaml-eglot-document-identifier` | |
197+
| `ocaml-eglot-construct` | <kbd>C-c</kbd> <kbd>\\</kbd> |
198+
| `ocaml-eglot-destruct` | <kbd>C-c</kbd> <kbd>\|</kbd> |
199+
| `ocaml-eglot-type-expression` | |
200+
| `ocaml-eglot-type-enclosing` | <kbd>C-c</kbd> <kbd>C-t</kbd> |
201+
| `ocaml-eglot-occurences` | |
202+
| `ocaml-eglot-rename` | |
203+
204+
148205
### Browsing errors
149206

150207
Eglot relies on
@@ -253,10 +310,6 @@ provided:
253310

254311
- `ocaml-eglot-find-type-definition-in-new-window`
255312
- `ocaml-eglot-find-type-definition-in-current-window`
256-
- `ocaml-eglot-phrase-prev` (<kbd>C-c</kbd> <kbd>C-p</kbd>): jump to
257-
the beginning of the previous phrase
258-
- `ocaml-eglot-phrase-next` (<kbd>C-c</kbd> <kbd>C-n</kbd>): jump to
259-
the beginning of the next phrase
260313

261314
### Find occurrences
262315

@@ -356,6 +409,10 @@ parent `fun` and the parent `match` expression. It is also possible to
356409
navigate between pattern matching cases:
357410

358411
- `ocaml-eglot-jump`: jumps to the referenced expression
412+
- `ocaml-eglot-phrase-prev` (<kbd>C-c</kbd> <kbd>C-p</kbd>): jump to
413+
the beginning of the previous phrase
414+
- `ocaml-eglot-phrase-next` (<kbd>C-c</kbd> <kbd>C-n</kbd>): jump to
415+
the beginning of the next phrase
359416

360417
![Source Browsing Example](media/jump.gif)
361418

0 commit comments

Comments
 (0)