From 2c407e3eb3cd87d1a0ccfcba42b079efaf1c364f Mon Sep 17 00:00:00 2001 From: Kevin Brubeck Unhammer Date: Wed, 14 Oct 2020 14:54:06 +0200 Subject: [PATCH] Doc what Emacs packages work w/IHP, how to get ghci path of direnv --- Guide/editors.markdown | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Guide/editors.markdown b/Guide/editors.markdown index 1cb4ce74c..bd50d2bc1 100644 --- a/Guide/editors.markdown +++ b/Guide/editors.markdown @@ -25,4 +25,18 @@ Works great already out of the box. Recommended packages: - `Nix` for syntax highlighting of nix files -- `Direnv` to load the `.envrc` file of the project. \ No newline at end of file +- `Direnv` to load the `.envrc` file of the project. + +## Using IHP with Emacs + +Install the following packages from [Melpa](https://melpa.org/#/getting-started): +- `dante` – gives IDE features via ghci, see https://github.com/jyp/dante#installation +- `direnv-mode` – lets haskell-mode and dante-mode find the PATH to ghci, see https://github.com/wbolster/emacs-direnv#installation +- `attrap` (optional) – apply fixes at point, see https://github.com/jyp/attrap + +and put a `.dir-locals.el` file in your project root with: +```emacs-lisp +((nil + (dante-repl-command-line . ("ghci")) + (haskell-process-type . ghci))) +```