fix(nix): make doctor check against nix-nixfmt-bin

This commit is contained in:
Yejun Su 2023-10-11 10:18:34 +08:00 committed by Henrik Lissner
parent 645c856de0
commit 47dc59f3b2

View file

@ -4,8 +4,9 @@
(unless (executable-find "nix") (unless (executable-find "nix")
(warn! "Couldn't find the nix package manager. nix-mode won't work.")) (warn! "Couldn't find the nix package manager. nix-mode won't work."))
(unless (executable-find "nixfmt") (when (require 'nix-mode nil t)
(warn! "Couldn't find nixfmt. nix-format-buffer won't work.")) (unless (executable-find nix-nixfmt-bin)
(warn! (concat "Couldn't find " nix-nixfmt-bin ". nix-format-buffer won't work."))))
(assert! (or (not (modulep! +tree-sitter)) (assert! (or (not (modulep! +tree-sitter))
(modulep! :tools tree-sitter)) (modulep! :tools tree-sitter))