branch: elpa/nix-mode
commit a1860c6bde1f66684b7698387397f930d63f264b
Author: Matthew Justin Bauer <[email protected]>
Commit: GitHub <[email protected]>

    Handle projectile projects
    
    Small code to register "default.nix" as a project type.
---
 nix-mode.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/nix-mode.el b/nix-mode.el
index a2d6dec078..8f229389bc 100644
--- a/nix-mode.el
+++ b/nix-mode.el
@@ -471,6 +471,10 @@ The hook `nix-mode-hook' is run when Nix mode is started.
   (add-to-list 'auto-mode-alist '("\\.nix\\'" . nix-mode))
   (add-to-list 'auto-mode-alist '("\\.nix.in\\'" . nix-mode)))
 
+(with-eval-after-load "projectile"
+  (projectile-register-project-type 'nix '("default.nix")
+                                    "nix-build"))
+
 (provide 'nix-mode)
 
 ;;; nix-mode.el ends here

Reply via email to