mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
editor/format: fix format-all-probe check
Returns '(nil nil) when there is no formatter for the current mode. This is truthy, so we needed a better check.
This commit is contained in:
@ -26,7 +26,7 @@ This is controlled by `+format-on-save-enabled-modes'."
|
||||
(memq major-mode (cdr +format-on-save-enabled-modes)))
|
||||
((not (memq major-mode +format-on-save-enabled-modes))))
|
||||
(not (require 'format-all nil t))
|
||||
(not (format-all-probe)))
|
||||
(equal (format-all-probe) (list nil nil)))
|
||||
(add-hook 'before-save-hook #'+format|buffer nil t)))
|
||||
|
||||
(when (featurep! +onsave)
|
||||
|
Reference in New Issue
Block a user