Merge pull request #718 from patrl/improve-dante
Refactored +dante feature
This commit is contained in:
commit
128af3f1e1
3 changed files with 7 additions and 19 deletions
|
@ -2,17 +2,8 @@
|
||||||
;;;###if (featurep! +dante)
|
;;;###if (featurep! +dante)
|
||||||
|
|
||||||
(def-package! dante
|
(def-package! dante
|
||||||
:after haskell-mode
|
:hook haskell-mode
|
||||||
:hook (haskell-mode . dante-mode)
|
|
||||||
:config
|
:config
|
||||||
(add-hook 'haskell-mode-hook #'interactive-haskell-mode))
|
(when (featurep! :feature syntax-checker)
|
||||||
|
(add-hook! 'dante-mode-hook
|
||||||
|
(flycheck-add-next-checker 'haskell-dante '(warning . haskell-hlint)))))
|
||||||
(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))
|
|
||||||
|
|
|
@ -4,9 +4,8 @@
|
||||||
(when (featurep! +dante)
|
(when (featurep! +dante)
|
||||||
(unless (executable-find "cabal")
|
(unless (executable-find "cabal")
|
||||||
(warn! "Couldn't find cabal, haskell-mode may have issues"))
|
(warn! "Couldn't find cabal, haskell-mode may have issues"))
|
||||||
|
(unless (executable-find "hlint")
|
||||||
(unless (executable-find "ghc-mod")
|
(warn! "Couldn't find hlint. Flycheck may have issues in haskell-mode/")))
|
||||||
(warn! "Couldn't find ghc-mod on PATH. Code completion will not work")))
|
|
||||||
|
|
||||||
(when (featurep! +intero)
|
(when (featurep! +intero)
|
||||||
(unless (executable-find "stack")
|
(unless (executable-find "stack")
|
||||||
|
|
|
@ -5,9 +5,7 @@
|
||||||
|
|
||||||
;;
|
;;
|
||||||
(cond ((featurep! +dante)
|
(cond ((featurep! +dante)
|
||||||
(package! dante)
|
(package! dante))
|
||||||
(when (featurep! :completion company)
|
|
||||||
(package! company-ghc)))
|
|
||||||
(t
|
(t
|
||||||
(package! intero)
|
(package! intero)
|
||||||
(package! hindent)))
|
(package! hindent)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue