Files
doomemacs/modules/tools/direnv
Henrik Lissner 79a8abd85a bump: :tools
Silex/docker.el@813c00410b -> Silex/docker.el@46b597a711
editorconfig/editorconfig-emacs@24f5b2b1cd -> editorconfig/editorconfig-emacs@1a9942746c
emacs-ansible/emacs-ansible@03e285bb54 -> emacs-ansible/emacs-ansible@4601ff31f5
emacs-citar/citar@2826996799 -> emacs-citar/citar@ce5e9644ed
emacs-lsp/dap-mode@ffb7957612 -> emacs-lsp/dap-mode@09dc16bae1
emacs-lsp/lsp-mode@d28dd6b7e3 -> emacs-lsp/lsp-mode@b383e637dc
emacs-lsp/lsp-ui@f0edfac7b3 -> emacs-lsp/lsp-ui@00e69463b4
emacs-straight/eglot@d3e44d33b7 -> emacs-straight/eglot@2d5d494bfc
emacs-tree-sitter/elisp-tree-sitter@fe98d0cae7 -> emacs-tree-sitter/elisp-tree-sitter@f3b6e78cd4
emacs-tree-sitter/tree-sitter-langs@4f951dbb53 -> emacs-tree-sitter/tree-sitter-langs@2ff446b4b8
emacsorphanage/quickrun@d383929c50 -> emacsorphanage/quickrun@7345432cea
gagbo/consult-lsp@6858391316 -> gagbo/consult-lsp@aef321d039
hpdeifel/synosaurus@14d34fc92a -> hpdeifel/synosaurus@690755ce88
jacktasia/dumb-jump@cd65a74337 -> jacktasia/dumb-jump@93665381d9
joostkremers/parsebib@f0e57a3606 -> joostkremers/parsebib@a25621930e
magit/forge@0c90606262 -> magit/forge@33e240d360
magit/magit@7dfebba55b -> magit/magit@f52dfada8f
mohkale/consult-eglot@9b490eb384 -> mohkale/consult-eglot@b71499f4b9
nicolaisingh/saveplace-pdf-view@70e9ec4056 -> nicolaisingh/saveplace-pdf-view@79e76562bc
purcell/envrc@60f5091538 -> purcell/envrc@2b818ca6e4
rejeep/prodigy.el@c5a17c280d -> rejeep/prodigy.el@99908d13be
tkf/emacs-request@01e338c335 -> tkf/emacs-request@c22e3c23a6
tumashu/posframe@8165153682 -> tumashu/posframe@12f540c9ad
2025-02-21 15:17:42 -05:00
..
2024-09-14 20:47:39 -04:00
2019-04-05 03:16:37 -04:00
2025-02-21 15:17:42 -05:00

:tools direnv

Description   unfold

This module integrates direnv into Emacs.

󰐃 direnv is an environment switcher for the shell. It knows how to hook into bash, zsh, tcsh, fish shell and elvish to load or unload environment variables depending on the current directory. This allows project-specific environment variables without cluttering the ~/.profile file.

Before each prompt, direnv checks for the existence of a ".envrc" file in the current and parent directories. If the file exists (and is authorized), it is loaded into a bash sub-shell and all exported variables are then captured by direnv and then made available to the current shell.

Module flags

This module has no flags.

Hacks

  • envrc-mode has been modified to fail gracefully if direnv isn't available.
  • envrc-global-mode has been modified to activate envrc-mode sooner in the major mode activation process, so that any env state performed in mode hooks aren't overwritten by direnv.
  • Added direnv support for Org src blocks.

TODO Changelog

This module does not have a changelog yet.

Installation

Enable this module in your doom! block.

This module requires direnv.

MacOS

brew install direnv

Arch Linux

direnv is available on the AUR:

yay -S direnv

NixOS

environment.systemPackages = [ pkgs.direnv ];

Or $ nix-env -i direnv

TODO Usage

󱌣 This module's usage documentation is incomplete. Complete it?

To make use of direnv you need a .envrc file in a directory. Any time you open a file or buffer in said directory, the doom-package:envrc Emacs package will kick in, activate the local env, and inject it into Emacs for the current buffer.

TODO Configuration

󱌣 This module has no configuration documentation yet. Write some?

Troubleshooting

Report an issue?

direnv + nix is slow

Consider augmenting direnv with lorri, which will cache nix builds and speed up direnv tremendously:

services.lorri.enable = true;

Frequently asked questions

This module has no FAQs yet. Ask one?

TODO Appendix

󱌣 This module has no appendix yet. Write one?