Created
June 27, 2014 18:25
-
-
Save spion/81b5fd00180b1c102f1c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; spion-purescript --- Purescript support for emacs | |
;;; Commentary: | |
;;; Code: | |
(define-derived-mode purescript-mode haskell-mode "PureScript" | |
"Major mode for PureScript") | |
(add-to-list 'auto-mode-alist (cons "\\.purs\\'" 'purescript-mode)) | |
(eval-after-load 'flycheck | |
'(progn | |
(flycheck-define-checker purs-check | |
"Use purscheck to flycheck PureScript code." | |
:command ("purscheck" source source-original temporary-file-name) | |
:error-patterns | |
((error line-start | |
(or (and "Error at " (file-name) " line " line ", column " column ":" (zero-or-more " ")) | |
(and "\"" (file-name) "\" (line " line ", column " column "):")) | |
(or (message (one-or-more not-newline)) | |
(and "\n" | |
(message | |
(zero-or-more " ") (one-or-more not-newline) | |
(zero-or-more "\n" | |
(zero-or-more " ") | |
(one-or-more not-newline))))) | |
line-end)) | |
:modes purescript-mode) | |
(add-to-list 'flycheck-checkers 'purs-check))) | |
(provide 'spion-purescript) | |
;;; spion-purescript ends here | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment