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:
parent
912a0bc059
commit
ceb985673c
1 changed files with 5 additions and 2 deletions
|
@ -45,8 +45,11 @@
|
|||
|
||||
(use-package! lsp-haskell
|
||||
:when (modulep! +lsp)
|
||||
:after lsp-mode
|
||||
:preface (add-hook 'haskell-mode-local-vars-hook #'lsp! 'append)
|
||||
:defer t
|
||||
: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
|
||||
;; Does some strange indentation if it pastes in the snippet
|
||||
(setq-hook! 'haskell-mode-hook yas-indent-line 'fixed))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue