doomemacs/modules/lang/haskell/config.el

38 lines
1.1 KiB
EmacsLisp
Raw Normal View History

;;; lang/haskell/config.el -*- lexical-binding: t; -*-
2016-03-29 01:06:37 -04:00
(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)
2016-03-29 18:11:56 -04:00
(autoload 'switch-to-haskell "inf-haskell" nil t)
(after! inf-haskell
(map! :map inf-haskell-mode-map "ESC ESC" #'doom/popup-close)))
2017-02-19 18:57:16 -05:00
(def-package! dante
:after haskell-mode
:config
(if (executable-find "cabal")
(add-hook! 'haskell-mode-hook
#'(flycheck-mode dante-mode interactive-haskell-mode))
(warn "haskell-mode: couldn't find cabal")))
2016-03-29 01:06:37 -04:00
(def-package! company-ghc
:when (featurep! :completion company)
:after haskell-mode
:config
(set! :company-backend 'haskell-mode #'company-ghc)
(setq company-ghc-show-info 'oneline)
(if (executable-find "ghc-mod")
(add-hook 'haskell-mode-hook #'ghc-comp-init)
(warn "haskell-mode: couldn't find ghc-mode")))