Refuse to enable intero-mode if intero is absent

Rather than checking for stack.
This commit is contained in:
Henrik Lissner 2018-06-27 19:35:22 +02:00
parent dceb9bea09
commit 4f40fef592
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -8,9 +8,9 @@
"Initializes `intero-mode' in haskell-mode, unless stack isn't installed.
This is necessary because `intero-mode' doesn't do its own error checks."
(when (derived-mode-p 'haskell-mode)
(if (executable-find "stack")
(if (executable-find "intero")
(intero-mode +1)
(message "Couldn't find stack. Refusing to enable intero-mode."))))
(message "Couldn't find intero. Refusing to enable intero-mode."))))
(add-hook 'haskell-mode-hook #'+haskell|init-intero)
:config
(set-lookup-handlers! 'intero-mode :definition #'intero-goto-definition))