Refactored dante feature.

This commit is contained in:
Patrick Elliott 2018-06-23 15:59:03 +02:00
parent a53503eadb
commit 7627b04f18
3 changed files with 6 additions and 18 deletions

View file

@ -2,17 +2,8 @@
;;;###if (featurep! +dante)
(def-package! dante
:after haskell-mode
:hook (haskell-mode . dante-mode)
:config
(add-hook 'haskell-mode-hook #'interactive-haskell-mode))
(def-package! company-ghc
:when (featurep! :completion company)
:after haskell-mode
:init
(add-hook 'haskell-mode-hook #'ghc-comp-init)
:config
(setq company-ghc-show-info 'oneline)
(set-company-backend! 'haskell-mode #'company-ghc))
(when (featurep! :feature syntax-checker)
(add-hook! 'dante-mode-hook
(flycheck-add-next-checker 'haskell-dante '(warning . haskell-hlint)))))

View file

@ -4,9 +4,8 @@
(when (featurep! +dante)
(unless (executable-find "cabal")
(warn! "Couldn't find cabal, haskell-mode may have issues"))
(unless (executable-find "ghc-mod")
(warn! "Couldn't find ghc-mod on PATH. Code completion will not work")))
(unless (executable-find "hlint")
(warn! "Couldn't find hlint. Flycheck may have issues in haskell-mode/")))
(when (featurep! +intero)
(unless (executable-find "stack")

View file

@ -5,9 +5,7 @@
;;
(cond ((featurep! +dante)
(package! dante)
(when (featurep! :completion company)
(package! company-ghc)))
(package! dante))
(t
(package! intero)
(package! hindent)))