Make idris2-mode play nice with envrc

This commit is contained in:
Nathan McCarty 2023-06-23 07:42:35 -04:00
parent 94f00b198a
commit beafb54995
Signed by: thatonelutenist
SSH Key Fingerprint: SHA256:hwQEcmak9E6sdU9bXc98RHw/Xd1AhpB5HZT7ZSVJkRM
1 changed files with 14 additions and 1 deletions

View File

@ -1045,8 +1045,21 @@ Disable company in idris2-mode, it's broken for now
#+begin_src emacs-lisp #+begin_src emacs-lisp
(after! idris2-mode (after! idris2-mode
:config :config
(setq company-global-modes '(not idris2-mode))) (setq company-global-modes '(not idris2-mode idris2-repl-mode)))
#+end_src #+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 ** Haskell
Setup formatting Setup formatting
#+begin_src emacs-lisp #+begin_src emacs-lisp