From ec11ff9a0c566313d9ffe702ac2e7b88c1dafed9 Mon Sep 17 00:00:00 2001 From: xvw Date: Thu, 23 Jan 2025 11:46:48 +0100 Subject: [PATCH] Fix format-on-save-hook --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a61505b..701a5b0 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,9 @@ Eglot provides a hook to format the buffer on saving: - (ocaml-eglot . eglot-ensure)) + (ocaml-eglot . eglot-ensure) + :config -+ (add-hook #'after-save-hook #'eglot-format)) ++ (add-hook #'ocaml-eglot-hook ++ (lambda () ++ (add-hook #'before-save-hook #'eglot-format nil t)))) ``` ## Features