fix(haskell): activate lsp! conditionally

use-package evaluates :preface *before* :when, so the two lsp! hooks
would run unconditionally, causing errors and warnings when opening a
haskell-mode buffer.

*
modules/lang/haskell/config.el (haskell-literate-mode-local-vars-hook):
add lsp! to hook.
This commit is contained in:
Henrik Lissner 2022-10-23 02:52:42 +02:00
parent 912a0bc059
commit ceb985673c
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -45,8 +45,11 @@
(use-package! lsp-haskell (use-package! lsp-haskell
:when (modulep! +lsp) :when (modulep! +lsp)
:after lsp-mode :defer t
:preface (add-hook 'haskell-mode-local-vars-hook #'lsp! 'append) :init
(add-hook 'haskell-mode-local-vars-hook #'lsp! 'append)
(add-hook 'haskell-literate-mode-local-vars-hook #'lsp! 'append)
(after! lsp-mode (require 'lsp-haskell))
:config :config
;; Does some strange indentation if it pastes in the snippet ;; Does some strange indentation if it pastes in the snippet
(setq-hook! 'haskell-mode-hook yas-indent-line 'fixed)) (setq-hook! 'haskell-mode-hook yas-indent-line 'fixed))