dotfiles/emacs/.emacs.d/config/init-direnv.el

18 lines
517 B
EmacsLisp
Raw Normal View History

2021-02-21 13:40:47 +00:00
;; 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
2021-02-22 14:43:04 +00:00
(lambda ()
(unless (file-remote-p default-directory)
(direnv-update-directory-environment))))
(add-hook 'vterm-directory-change-hook
2021-02-21 13:40:47 +00:00
(lambda ()
(unless (file-remote-p default-directory)
(direnv-update-directory-environment)))))
(provide 'init-direnv)