Skip to content

Commit 08b3508

Browse files
authored
Merge pull request #38 from tarides/pre-release-1.1.0
Pre release 1.1.0
2 parents b2553de + bb8318c commit 08b3508

File tree

3 files changed

+27
-2
lines changed

3 files changed

+27
-2
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.1.0
22
======================
3+
Fri Mar 28 01:27:46 PM CET 2025
34

45
- A first support for `flycheck` ([#29](https://github.com/tarides/ocaml-eglot/pull/29), [#33](https://github.com/tarides/ocaml-eglot/pull/33) and [#37](https://github.com/tarides/ocaml-eglot/pull/37))
56
- Use a more efficient way to ensure that a vector is empty ([#27](https://github.com/tarides/ocaml-eglot/pull/27))

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ Eglot provides a hook to format the buffer on saving:
5757
:hook
5858
(tuareg-mode . ocaml-eglot)
5959
- (ocaml-eglot . eglot-ensure))
60+
+ (ocaml-eglot . eglot-ensure)
6061
+ (ocaml-eglot . (lambda ()
6162
+ (add-hook #'before-save-hook #'eglot-format nil t))))
6263
```
@@ -80,11 +81,34 @@ configuration in this way:
8081
:hook
8182
(tuareg-mode . ocaml-eglot)
8283
- (ocaml-eglot . eglot-ensure))
84+
+ (ocaml-eglot . eglot-ensure)
8385
+ (ocaml-eglot . (lambda () (flycheck-eglot-mode 1)))
8486
+ :config
8587
+ (setq ocaml-eglot-syntax-checker 'flycheck))
8688
```
8789

90+
### Using Merlin-configuration
91+
92+
OCaml-lsp-server can use `.merlin` as a configuration template (rather
93+
than configuring via `dune`). This requires the
94+
[`dot-merlin-reader`](https://ocaml.org/p/dot-merlin-reader/latest)
95+
package to be installed in the switch being used, and `eglot` can be
96+
configured in this way:
97+
98+
```diff
99+
(use-package ocaml-eglot
100+
:ensure t
101+
:after tuareg
102+
:hook
103+
(tuareg-mode . ocaml-eglot)
104+
- (ocaml-eglot . eglot-ensure))
105+
+ (ocaml-eglot . eglot-ensure)
106+
+ :config
107+
+ (with-eval-after-load 'eglot
108+
+ (add-to-list 'eglot-server-programs
109+
+ '(tuareg-mode . ("ocamllsp" "--fallback-read-dot-merlin")))))
110+
```
111+
88112
## Features
89113

90114
### Browsing errors

ocaml-eglot.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
;; Keywords: ocaml languages
1414
;; URL: https://github.com/tarides/ocaml-eglot
1515
;; Package-Requires: ((emacs "29.1"))
16-
;; Package-Version: 1.0
16+
;; Package-Version: 1.1
1717
;; SPDX-License-Identifier: MIT
1818

1919
;;; Commentary:

0 commit comments

Comments
 (0)