Skip to content

Commit

Permalink
Fix format-on-save-hook
Browse files Browse the repository at this point in the history
  • Loading branch information
xvw committed Jan 23, 2025
1 parent 0ddd389 commit ec11ff9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ec11ff9

Please sign in to comment.