doomemacs/modules/lang/haskell/config.el

41 lines
1 KiB
EmacsLisp
Raw Normal View History

;;; lang/haskell/config.el -*- lexical-binding: t; -*-
2016-03-29 01:06:37 -04:00
(cond ((featurep! +intero) (load! +intero))
((featurep! +dante) (load! +dante)))
;;
;; Common plugins
;;
(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
2017-09-09 11:31:49 -07:00
(map! :map inferior-haskell-mode-map "ESC ESC" #'doom/popup-close)))
2017-02-19 18:57:16 -05:00
(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))