Skip to content

Commit 53254d6

Browse files
Add compatibility with emacs ocaml tree-sitter modes (#2600)
1 parent ed78f3a commit 53254d6

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Diff for: CHANGES.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ profile. This started with version 0.26.0.
4343

4444
### Added
4545

46-
- Allow a custom command to be used to run ocamlformat in the emacs plugin (#2577, @gridbugs)
46+
- Improve the emacs plugin (#2577, #2600, @gridbugs, @thibautbenjamin)
47+
Allow a custom command to be used to run ocamlformat and add compatibility
48+
with emacs ocaml tree-sitter modes.
4749

4850
- Added option `let-binding-deindent-fun` (#2521, @henrytill)
4951
to control the indentation of the `fun` in:

Diff for: emacs/ocamlformat.el

+3-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ nil (default)."
100100
101101
\(add-hook \\='before-save-hook \\='ocamlformat-before-save)."
102102
(interactive)
103-
(when (memq major-mode '(tuareg-mode caml-mode)) (ocamlformat)))
103+
(when
104+
(memq major-mode '(tuareg-mode caml-mode ocaml-ts-mode ocamli-ts-mode))
105+
(ocamlformat)))
104106

105107
(defun ocamlformat--goto-line (line)
106108
"Move point to the line numbered LINE."

0 commit comments

Comments
 (0)