Extend Haskell support

- Format imports on buffer-save.
- Adds two new snippets
This commit is contained in:
William Carroll 2018-07-06 13:34:43 -04:00
parent b147b5fbd0
commit bb8cb310fa
3 changed files with 14 additions and 2 deletions

View file

@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: language extension
# key: lang
# --
{-# LANGUAGE $1 #-}

View file

@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: Separator
# key: -
# --
--------------------------------------------------------------------------------

View file

@ -26,7 +26,9 @@
'(("`mappend`" . "") '(("`mappend`" . "")
("<>" . "")))) ("<>" . ""))))
(dolist (item m-symbols) (add-to-list 'haskell-font-lock-symbols-alist item))) (dolist (item m-symbols) (add-to-list 'haskell-font-lock-symbols-alist item)))
(setq haskell-font-lock-symbols t)) (setq haskell-font-lock-symbols t)
(add-hook 'before-save-hook #'haskell-align-imports))
(defun empire/haskell/module->test () (defun empire/haskell/module->test ()
"Jump from a module to a test." "Jump from a module to a test."
@ -54,4 +56,4 @@
(empire/haskell/test->module))) (empire/haskell/test->module)))
(provide 'wpc-haskell) (provide 'wpc-haskell)
;;; haskell.el ends here ;;; wpc-haskell.el ends here