doomemacs/modules/lang/haskell/+dante.el
Henrik Lissner fd19698927
doom|hack-local-variables => MODE-local-vars-hook
Uses a less destructive method (the same that Spacemacs uses) than the
one introduced in 13cee68, by introducing MODE-local-vars-hook hooks,
which run after local vars have been initialized.

The old method was to call `hack-local-variables` *before* mode hooks
run, however, this causes variables set by modes to have higher
precedence than local vars, which is unacceptable.

Also moved intero-mode & dante-mode to haskell-mode-local-vars-hook
2018-09-29 15:01:35 -04:00

26 lines
979 B
EmacsLisp

;;; lang/haskell/+dante.el -*- lexical-binding: t; -*-
;;;###if (featurep! +dante)
(def-package! dante
:hook (haskell-mode-local-vars . dante-mode)
:init
(setq dante-load-flags '(;; defaults:
"+c"
"-Wwarn=missing-home-modules"
"-fno-diagnostics-show-caret"
;; neccessary to make attrap-attrap useful:
"-Wall"
;; necessary to make company completion useful:
"-fdefer-typed-holes"
"-fdefer-type-errors"))
:config
(when (featurep! :feature syntax-checker)
(flycheck-add-next-checker 'haskell-dante '(warning . haskell-hlint)))
(map! :map dante-mode-map
:localleader
:n "t" #'dante-type-at
:n "i" #'dante-info
:n "l" #'haskell-process-load-or-reload
:n "e" #'dante-eval-block
:n "a" #'attrap-attrap))