diff --git a/contrib/lang/haskell/packages.el b/contrib/lang/haskell/packages.el index 8cf721a07..ade51ac16 100644 --- a/contrib/lang/haskell/packages.el +++ b/contrib/lang/haskell/packages.el @@ -183,8 +183,17 @@ (add-hook 'evil-emacs-state-exit-hook 'spacemacs//haskell-indentation-hide-guides)))) (defun haskell/init-haskell-snippets () - (use-package haskell-snippets - :defer t)) + ;; manually load the package since the current implementation is not lazy + ;; loading friendly (funny coming from the haskell mode :-)) + (setq haskell-snippets-dir (spacemacs//get-package-directory + 'haskell-snippets)) + + (defun haskell-snippets-initialize () + (let ((snip-dir (expand-file-name "snippets" haskell-snippets-dir))) + (add-to-list 'yas-snippet-dirs snip-dir t) + (yas-load-directory snip-dir))) + + (eval-after-load 'yasnippet '(haskell-snippets-initialize))) (defun haskell/init-hindent () (use-package hindent