all repos — nixfiles @ 22398eb643502ef037558cc6765aa49f680b548e

System and user configuration, managed by nix and home-manager

Enable direnv support in emacs and neovim
Alan Pearce alan@alanpearce.eu
Thu, 13 Apr 2023 10:18:16 +0200
commit

22398eb643502ef037558cc6765aa49f680b548e

parent

27ef82a1e760b9b8949e6a2ef01ce8062803bdf7

3 files changed, 9 insertions(+), 0 deletions(-)

jump to
M user/emacs/init.eluser/emacs/init.el
@@ -938,6 +938,12 @@ :general (:keymaps 'projectile-command-map                      "s s" #'counsel-projectile-rg
                      "s r" #'counsel-projectile-rg))
 
+(use-package envrc
+  :defer 2
+  :after projectile
+  :config (progn
+            (envrc-global-mode)))
+
 (use-package magit
   :defer 5
   :commands (magit-status magit-dispatch)
@@ -1174,6 +1180,7 @@ "bx" #'kill-this-buffer   "br" #'revert-buffer
   "bk" #'kill-buffer
   "dd" #'dired
+  "e" '(:keymap envrc-command-map :package envrc)
   "fs" #'save-buffer
   "ff" #'find-file
   "fw" #'write-file
M user/settings/emacs.nixuser/settings/emacs.nix
@@ -95,6 +95,7 @@ counsel-projectile         crux
         ctrlf
         dired-git-info
+        envrc
         editorconfig
         eglot
         eldoc-box
M user/settings/neovim.nixuser/settings/neovim.nix
@@ -14,6 +14,7 @@ coc-git       coc-json
       coc-tabnine
       coc-yaml
+      direnv-vim
       vim-surround
     ];
     extraLuaConfig = builtins.readFile ../nvim/init.lua;