Created
November 14, 2013 05:01
-
-
Save kazu-yamamoto/7461668 to your computer and use it in GitHub Desktop.
ELisp configuration for Haskell
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
(load "haskell-site-file") | |
(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation) | |
(add-hook 'haskell-mode-hook 'turn-on-font-lock) | |
(defun haskell-style () | |
"Sets the current buffer to use Haskell Style. Meant to be | |
added to `haskell-mode-hook'" | |
(setq tab-width 4 | |
haskell-indentation-layout-offset 4 | |
haskell-indentation-left-offset 4 | |
haskell-indentation-ifte-offset 4)) | |
(autoload 'ghc-init "ghc" nil t) | |
(add-hook 'haskell-mode-hook | |
(lambda () | |
(setq show-trailing-whitespace t) | |
(ghc-init) | |
(flymake-mode))) | |
(add-hook 'haskell-mode-hook 'haskell-style) | |
(add-hook 'haskell-cabal-mode-hook | |
(lambda () | |
(setq show-trailing-whitespace t) | |
(setq indent-tabs-mode nil))) | |
(setq ghc-hlint-options '("--ignore=Use camelCase")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment