haskell layer: fix haskell-snippets loading

fixes #1471
This commit is contained in:
syl20bnr 2015-05-04 00:27:13 -04:00
parent c634baceec
commit 480c6df909

View file

@ -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