Add direnv.el

This commit is contained in:
Jeremy Dormitzer 2021-02-21 08:40:47 -05:00
parent 0644e85ad3
commit 3395f69fb4
2 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,13 @@
;; Smooth integration with direnv
(use-package direnv
:if (executable-find "direnv")
:defer 2
:config
(direnv-mode)
(add-hook 'eshell-mode-hook #'direnv-update-directory-environment)
(add-hook 'eshell-directory-change-hook
(lambda ()
(unless (file-remote-p default-directory)
(direnv-update-directory-environment)))))
(provide 'init-direnv)

View File

@ -78,6 +78,7 @@
(require 'init-run-command)
(require 'init-aws)
(require 'init-prodigy)
(require 'init-direnv)
;; Load the custom file
(when (file-exists-p custom-file)