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
This commit is contained in:
parent
b674aef31b
commit
fd19698927
3 changed files with 10 additions and 11 deletions
|
@ -2,7 +2,7 @@
|
|||
;;;###if (featurep! +dante)
|
||||
|
||||
(def-package! dante
|
||||
:hook (haskell-mode . dante-mode)
|
||||
:hook (haskell-mode-local-vars . dante-mode)
|
||||
:init
|
||||
(setq dante-load-flags '(;; defaults:
|
||||
"+c"
|
||||
|
|
|
@ -11,7 +11,7 @@ This is necessary because `intero-mode' doesn't do its own error checks."
|
|||
(if (executable-find "stack")
|
||||
(intero-mode +1)
|
||||
(message "Couldn't find stack. Refusing to enable intero-mode."))))
|
||||
(add-hook 'haskell-mode-hook #'+haskell|init-intero)
|
||||
(add-hook 'haskell-mode-local-vars-hook #'+haskell|init-intero)
|
||||
:config
|
||||
(setq haskell-compile-cabal-build-command "stack build --fast")
|
||||
(set-lookup-handlers! 'intero-mode :definition #'intero-goto-definition)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue