lang/haskell: fix haskell-mode + add dante

This commit is contained in:
Henrik Lissner 2017-03-16 17:22:13 -04:00
parent ec834c8ffa
commit 134c813c46
2 changed files with 17 additions and 7 deletions

View file

@ -1,20 +1,29 @@
;;; module-haskell.el
(def-package! haskell
;; Requires cabal installed for syntax-checking, and ghci (or hugs) to be
;; installed for REPL support.
(def-package! haskell-mode
:mode (("\\.hs$" . haskell-mode)
("\\.ghci$" . ghci-script-mode)
("\\.cabal$" . haskell-cabal-mode))
:interpreter (("runghc" . haskell-mode)
("runhaskell" . haskell-mode))
:init
(add-hook! haskell-mode '(interactive-haskell-mode flycheck-mode))
:config
(load "haskell-mode-autoloads" nil t)
(set! :popup "*debug:haskell*" :size 20)
(set! :repl 'haskell-mode 'switch-to-haskell)
(push ".hi" completion-ignored-extensions))
(push ".hi" completion-ignored-extensions)
(autoload 'switch-to-haskell "inf-haskell" nil t)
(after! inf-haskell
(map! :map inf-haskell-mode-map "ESC ESC" 'doom/popup-close)))
(def-package! inf-haskell ; part of haskell
:commands (inferior-haskell-mode inf-haskell-mode switch-to-haskell)
:config (map! :map inf-haskell-mode-map "ESC ESC" 'doom/popup-close))
(def-package! dante
:after haskell-mode
:config
(when (executable-find "cabal")
(add-hook! 'haskell-mode-hook '(flycheck-mode dante-mode))))

View file

@ -2,4 +2,5 @@
;;; lang/haskell/packages.el
(package! haskell-mode)
(package! dante)