Skip to content

Commit

Permalink
Fix syl20bnr#1493: add align rule for Haskell
Browse files Browse the repository at this point in the history
  • Loading branch information
pradermecker authored and syl20bnr committed Oct 12, 2015
1 parent 49df016 commit dac0ba8
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion layers/+lang/haskell/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,26 @@
(add-hook 'evil-insert-state-entry-hook 'spacemacs//haskell-indentation-show-guides)
(add-hook 'evil-emacs-state-entry-hook 'spacemacs//haskell-indentation-show-guides)
(add-hook 'evil-insert-state-exit-hook 'spacemacs//haskell-indentation-hide-guides)
(add-hook 'evil-emacs-state-exit-hook 'spacemacs//haskell-indentation-hide-guides)))
(add-hook 'evil-emacs-state-exit-hook 'spacemacs//haskell-indentation-hide-guides))

;; align rules for Haskell
(with-eval-after-load 'align
(add-to-list 'align-rules-list
'(haskell-types
(regexp . "\\(\\s-+\\)\\(::\\|∷\\)\\s-+")
(modes . '(haskell-mode literate-haskell-mode))))
(add-to-list 'align-rules-list
'(haskell-assignment
(regexp . "\\(\\s-+\\)=\\s-+")
(modes . '(haskell-mode literate-haskell-mode))))
(add-to-list 'align-rules-list
'(haskell-arrows
(regexp . "\\(\\s-+\\)\\(->\\|→\\)\\s-+")
(modes . '(haskell-mode literate-haskell-mode))))
(add-to-list 'align-rules-list
'(haskell-left-arrows
(regexp . "\\(\\s-+\\)\\(<-\\|←\\)\\s-+")
(modes . '(haskell-mode literate-haskell-mode))))))

(defun haskell/init-haskell-snippets ()
;; manually load the package since the current implementation is not lazy
Expand Down

0 comments on commit dac0ba8

Please sign in to comment.