diff --git a/emacs/init.org b/emacs/init.org index 67b1601..18af486 100755 --- a/emacs/init.org +++ b/emacs/init.org @@ -2621,12 +2621,15 @@ The Emacs Multi-Media System. For libtag to work, libtag must be installed on th * Direnv [[https://direnv.net/][Direnv]] automatically runs bash scripts when you enter certain directories. This sets it up to work with Emacs: #+BEGIN_SRC emacs-lisp + (defun update-cider-env () + (direnv-update-directory-environment nrepl-project-dir)) + (use-package direnv :if (executable-find "direnv") :config (direnv-mode) (add-hook 'eshell-mode-hook #'direnv-update-directory-environment) (add-hook 'eshell-directory-change-hook #'direnv-update-directory-environment) - (add-buffer-mode-hook 'cider-repl-mode (lambda () (direnv-update-directory-environment nrepl-project-dir)))) + (add-buffer-mode-hook 'cider-repl-mode #'update-cider-env)) #+END_SRC * SQL Emacs has excellent built-in SQL support.