18 lines
517 B
EmacsLisp
18 lines
517 B
EmacsLisp
;; 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))))
|
|
(add-hook 'vterm-directory-change-hook
|
|
(lambda ()
|
|
(unless (file-remote-p default-directory)
|
|
(direnv-update-directory-environment)))))
|
|
|
|
(provide 'init-direnv)
|