A GNU Emacs library which uses the mise tool to determine per-directory/project environment variables and then set those environment variables on a per-buffer basis.
Heavily inspired from envrc which created by Purcell.
- inheirtenv
- mise, version >= 2024.10.8
- emacs, version >= 29.1
- dash version >= 2.19.1
- Manually
Clone and add to load-path
, require the package.
- Melpa
This package is available on MELPA. Install with M-x package-install
RET
mise
within Emacs.
;; Directly
(require mise)
;; enable globally
(add-hook 'after-init-hook #'global-mise-mode)
;; or turn on in some buffer
(add-hook 'emacs-lisp-mode-hook #'mise-mode)
-
mise-update-on-eshell-directory-change
: enable it would update environment when changing directory in eshell. -
mise-exclude-predicate
: conditional function to exclude buffers which shouldn't turn onmise-mode
. -
mise-auto-propagate-commands
: list of commands which running with mise environment activated.
- support more options in
mise
cli
If you think the it's helpful for you, please consider paying a cup of coffee for me. Thank you! 😄