From 1ec8fed31cebd20273a0b7f1265ca4d3984de1ff Mon Sep 17 00:00:00 2001 From: Thibaut Benjamin Date: Fri, 25 Oct 2024 11:47:42 +0100 Subject: [PATCH 1/2] Add compatibility with emacs ocaml tree-sitter modes --- emacs/ocamlformat.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/emacs/ocamlformat.el b/emacs/ocamlformat.el index 9d0d7adb17..47c0c0a9c3 100644 --- a/emacs/ocamlformat.el +++ b/emacs/ocamlformat.el @@ -100,7 +100,9 @@ nil (default)." \(add-hook \\='before-save-hook \\='ocamlformat-before-save)." (interactive) - (when (memq major-mode '(tuareg-mode caml-mode)) (ocamlformat))) + (when + (memq major-mode '(tuareg-mode caml-mode ocaml-ts-mode ocamli-ts-mode)) + (ocamlformat))) (defun ocamlformat--goto-line (line) "Move point to the line numbered LINE." From 237de22301cc680e8651d735bd57c1b59f3dfd1f Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Thu, 28 Nov 2024 11:00:34 +0100 Subject: [PATCH 2/2] Update CHANGES --- CHANGES.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 7d061c8985..82ec1daca5 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -43,7 +43,9 @@ profile. This started with version 0.26.0. ### Added -- Allow a custom command to be used to run ocamlformat in the emacs plugin (#2577, @gridbugs) +- Improve the emacs plugin (#2577, #2600, @gridbugs, @thibautbenjamin) + Allow a custom command to be used to run ocamlformat and add compatibility + with emacs ocaml tree-sitter modes. - Added option `let-binding-deindent-fun` (#2521, @henrytill) to control the indentation of the `fun` in: