This repository has been archived by the owner on Jul 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init-haskell.el
46 lines (39 loc) · 1.41 KB
/
init-haskell.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
(use-package haskell-mode ; Haskell major mode
:ensure t
:defer t
:bind (:map haskell-mode-map
("M-d" . haskell-mode-jump-to-def-or-tag))
:config
(setq haskell-tags-on-save t ; Regenerate TAGS on save
haskell-process-log t ; Show log for GHCI process
;; Remove unused imports and auto-import modules
haskell-process-suggest-remove-import-lines t
haskell-process-auto-import-loaded-modules t)
(add-hook 'haskell-mode-hook (lambda () (ghc-init)))
(add-hook 'haskell-mode-hook #'haskell-decl-scan-mode) ; IMenu support
(add-hook 'haskell-mode-hook #'interactive-haskell-mode))
(use-package flycheck-haskell
:ensure t
:after flycheck haskell-mode
:init
(add-hook 'flycheck-mode-hook #'flycheck-haskell-setup)
)
(use-package cabal-mode ; Cabal files
:ensure haskell-mode
:defer t
:bind (:map haskell-cabal-mode-map
("C-`" . haskell-interactive-bring)
("C-c C-k" . haskell-interactive-mode-clear)
("C-c C-c" . haskell-process-cabal-build)
("C-c c" . haskell-process-cabal)))
(use-package company-ghc
:ensure t
:init
(add-to-list 'company-backends 'company-ghc)
(setq company-ghc-show-info t))
(use-package hindent ; Haskell indentation
:after haskell-mode
:ensure t
:init
(add-hook 'haskell-mode-hook #'hindent-mode))
(provide 'init-haskell)