doomemacs/modules/lang/haskell/config.el
Henrik Lissner 56382f1215
lang/haskell: add intero support #158
To use dante instead, change `haskell` to `(haskell +dante)` in
~/.emacs.d/init.el.
2017-08-09 14:52:48 +02:00

37 lines
1,020 B
EmacsLisp

;;; lang/haskell/config.el -*- lexical-binding: t; -*-
(def-package! haskell-mode
:mode "\\.hs$"
:mode ("\\.ghci$" . ghci-script-mode)
:mode ("\\.cabal$" . haskell-cabal-mode)
:interpreter (("runghc" . haskell-mode)
("runhaskell" . haskell-mode))
:config
(load "haskell-mode-autoloads" nil t)
(set! :repl 'haskell-mode #'switch-to-haskell)
(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! company-ghc
:when (featurep! :completion company)
:after haskell-mode
:init
(add-hook 'haskell-mode-hook #'ghc-comp-init)
:config
(if (executable-find "ghc-mod")
(set! :company-backend 'haskell-mode #'company-ghc)
(warn "haskell-mode: couldn't find ghc-mode")
(remove-hook 'haskell-mode-hook #'ghc-comp-init))
(setq company-ghc-show-info 'oneline))
;;
(if (featurep! +dante)
(load! +dante)
(load! +intero))