editor/format: add +format|on-save buffer-locally

This commit is contained in:
Henrik Lissner
2018-08-26 17:31:14 +02:00
parent f1460ff592
commit 3b69045ed4

View File

@ -26,7 +26,7 @@ control which major modes to target."
((not (memq major-mode +format-on-save-enabled-modes))))
(not (require 'format-all nil t))
(not (format-all-probe)))
(add-hook 'before-save-hook #'+format|on-save)))
(add-hook 'before-save-hook #'+format|on-save nil t)))
(when (featurep! +onsave)
(add-hook 'after-change-major-mode-hook #'+format|enable-on-save-maybe))