Added stack build support for intero users

This commit is contained in:
Patrick Elliott 2018-07-18 09:11:48 +02:00
parent 6334af8a84
commit b0a754391a
2 changed files with 4 additions and 2 deletions

View file

@ -13,6 +13,7 @@ This is necessary because `intero-mode' doesn't do its own error checks."
(message "Couldn't find stack. Refusing to enable intero-mode."))))
(add-hook 'haskell-mode-hook #'+haskell|init-intero)
:config
(setq haskell-compile-cabal-build-command "stack build --fast")
(set-lookup-handlers! 'intero-mode :definition #'intero-goto-definition)
(when (featurep! :feature syntax-checker)
(flycheck-add-next-checker 'intero '(warning . haskell-hlint))))

View file

@ -13,6 +13,9 @@
(after! haskell-mode
(map! :map haskell-mode-map
:localleader
;; this is set to use cabal for dante users and stack for intero users:
:n "b" #'haskell-process-cabal-build
:n "c" #'haskell-cabal-visit-file
:n "p" #'hindent-reformat-buffer
:v "p" #'hindent-reformat-region))
@ -29,8 +32,6 @@
(after! dante-mode
(map! :map dante-mode-map
:localleader
:n "b" #'haskell-process-cabal-build
:n "c" #'haskell-cabal-visit-file
:n "t" #'dante-type-at
:n "i" #'dante-info
:n "l" #'haskell-process-load-or-reload