From beafb54995595c95be485106cd7e2853b25e49c7 Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Fri, 23 Jun 2023 07:42:35 -0400 Subject: [PATCH] Make idris2-mode play nice with envrc --- config.org | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/config.org b/config.org index c1c7acc..7fee7e3 100644 --- a/config.org +++ b/config.org @@ -1045,8 +1045,21 @@ Disable company in idris2-mode, it's broken for now #+begin_src emacs-lisp (after! idris2-mode :config - (setq company-global-modes '(not idris2-mode))) + (setq company-global-modes '(not idris2-mode idris2-repl-mode))) #+end_src + +Patch idris2-run via advice to pass through the environment, so that envrc will work properly. +We need to patch ~idris2-ru~, ~idris2-repl-buffer~, and the ~idris2-ipkg-command~ family +#+begin_src emacs-lisp +(after! idris2-mode + (require 'envrc) + (advice-add 'idris2-run :around #'envrc-propagate-environment) + (advice-add 'idris2-repl-buffer :around #'envrc-propagate-environment) + (advice-add 'idris2-ipkg-command :around #'envrc-propagate-environment) + (advice-add 'idris2-ipkg-build :around #'envrc-propagate-environment) + (advice-add 'idris2-ipkg-clean :around #'envrc-propagate-environment)) +#+end_src + ** Haskell Setup formatting #+begin_src emacs-lisp