From 29931c6dbd4b76fe06149c0a7a9e5a5b40f65d0c Mon Sep 17 00:00:00 2001 From: Yejun Su Date: Wed, 11 Oct 2023 10:18:34 +0800 Subject: [PATCH] fix(nix): make doctor check against nix-nixfmt-bin --- modules/lang/nix/doctor.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/lang/nix/doctor.el b/modules/lang/nix/doctor.el index 043ce4c8c..fe1b18b35 100644 --- a/modules/lang/nix/doctor.el +++ b/modules/lang/nix/doctor.el @@ -4,8 +4,9 @@ (unless (executable-find "nix") (warn! "Couldn't find the nix package manager. nix-mode won't work.")) -(unless (executable-find "nixfmt") - (warn! "Couldn't find nixfmt. nix-format-buffer won't work.")) +(when (require 'nix-mode nil t) + (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)) (modulep! :tools tree-sitter))