Skip to content

Commit

Permalink
Upstream envrc now checks for direnv availability
Browse files Browse the repository at this point in the history
  • Loading branch information
purcell committed Apr 26, 2024
1 parent 0b68206 commit cea0841
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lisp/init-direnv.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,9 @@
;;; Code:

(when (maybe-require-package 'envrc)
(defun sanityinc/maybe-enable-envrc-global-mode ()
"Enable `envrc-global-mode' if `direnv' is installed."
(when (executable-find "direnv")
(envrc-global-mode)))

(with-eval-after-load 'envrc
(define-key envrc-mode-map (kbd "C-c e") 'envrc-command-map))
(add-hook 'after-init-hook 'sanityinc/maybe-enable-envrc-global-mode))
(add-hook 'after-init-hook 'envrc-global-mode))

(provide 'init-direnv)

Expand Down

0 comments on commit cea0841

Please sign in to comment.