Add direnv.el
This commit is contained in:
parent
0644e85ad3
commit
3395f69fb4
13
emacs/.emacs.d/config/init-direnv.el
Normal file
13
emacs/.emacs.d/config/init-direnv.el
Normal 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)
|
@ -78,6 +78,7 @@
|
|||||||
(require 'init-run-command)
|
(require 'init-run-command)
|
||||||
(require 'init-aws)
|
(require 'init-aws)
|
||||||
(require 'init-prodigy)
|
(require 'init-prodigy)
|
||||||
|
(require 'init-direnv)
|
||||||
|
|
||||||
;; Load the custom file
|
;; Load the custom file
|
||||||
(when (file-exists-p custom-file)
|
(when (file-exists-p custom-file)
|
||||||
|
Loading…
Reference in New Issue
Block a user