Extend Haskell support
- Format imports on buffer-save. - Adds two new snippets
This commit is contained in:
parent
b147b5fbd0
commit
bb8cb310fa
3 changed files with 14 additions and 2 deletions
5
emacs.d/snippets/haskell-mode/language-extension
Normal file
5
emacs.d/snippets/haskell-mode/language-extension
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: language extension
|
||||||
|
# key: lang
|
||||||
|
# --
|
||||||
|
{-# LANGUAGE $1 #-}
|
5
emacs.d/snippets/haskell-mode/separator
Normal file
5
emacs.d/snippets/haskell-mode/separator
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: Separator
|
||||||
|
# key: -
|
||||||
|
# --
|
||||||
|
--------------------------------------------------------------------------------
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue