mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
lang/haskell: fix haskell-mode + add dante
This commit is contained in:
@ -1,20 +1,29 @@
|
|||||||
;;; module-haskell.el
|
;;; 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)
|
:mode (("\\.hs$" . haskell-mode)
|
||||||
("\\.ghci$" . ghci-script-mode)
|
("\\.ghci$" . ghci-script-mode)
|
||||||
("\\.cabal$" . haskell-cabal-mode))
|
("\\.cabal$" . haskell-cabal-mode))
|
||||||
:interpreter (("runghc" . haskell-mode)
|
:interpreter (("runghc" . haskell-mode)
|
||||||
("runhaskell" . haskell-mode))
|
("runhaskell" . haskell-mode))
|
||||||
:init
|
|
||||||
(add-hook! haskell-mode '(interactive-haskell-mode flycheck-mode))
|
|
||||||
:config
|
:config
|
||||||
|
(load "haskell-mode-autoloads" nil t)
|
||||||
|
|
||||||
(set! :popup "*debug:haskell*" :size 20)
|
(set! :popup "*debug:haskell*" :size 20)
|
||||||
(set! :repl 'haskell-mode 'switch-to-haskell)
|
(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
|
(def-package! dante
|
||||||
:commands (inferior-haskell-mode inf-haskell-mode switch-to-haskell)
|
:after haskell-mode
|
||||||
:config (map! :map inf-haskell-mode-map "ESC ESC" 'doom/popup-close))
|
:config
|
||||||
|
(when (executable-find "cabal")
|
||||||
|
(add-hook! 'haskell-mode-hook '(flycheck-mode dante-mode))))
|
||||||
|
|
||||||
|
@ -2,4 +2,5 @@
|
|||||||
;;; lang/haskell/packages.el
|
;;; lang/haskell/packages.el
|
||||||
|
|
||||||
(package! haskell-mode)
|
(package! haskell-mode)
|
||||||
|
(package! dante)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user