Created
June 6, 2014 10:27
-
-
Save gregorycollins/ebb015a0c04be07604ad to your computer and use it in GitHub Desktop.
This file contains hidden or 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
(defun haskell-style () | |
"Sets the current buffer to use Haskell Style. Meant to be | |
added to `haskell-mode-hook'" | |
(interactive) | |
(haskell-indent-mode 1) | |
(haskell-doc-mode 1) | |
;; (turn-on-haskell-indentation) | |
(setq haskell-indent-thenelse 2 | |
haskell-indent-after-keywords '(("where" 2 0) | |
("of" 2) | |
("do" 4) | |
("in" 2 0) | |
("{" 2) | |
("if" 2) | |
("then" 0) | |
("else" 0) | |
("let" 0))) | |
(local-set-key (kbd "RET") 'newline) | |
;; Customization | |
(custom-set-variables | |
;; Use cabal-dev for the GHCi session. Ensures our dependencies are in scope. | |
;'(haskell-process-type 'cabal-dev) | |
;'(haskell-process-type 'cabal-ghci) | |
'(haskell-process-type 'cabal-repl) | |
;; Use notify.el (if you have it installed) at the end of running | |
;; Cabal commands or generally things worth notifying. | |
'(haskell-notify-p t) | |
;; To enable tags generation on save. | |
; note: requires process mode | |
'(haskell-tags-on-save t) | |
;; Disable error folding | |
'(haskell-interactive-mode-hide-multi-line-errors nil) | |
;; To enable stylish on save. | |
'(haskell-stylish-on-save t)) | |
(setq tab-width 4 | |
haskell-indentation-layout-offset 2 | |
haskell-indentation-left-offset 2 | |
haskell-indentation-starter-offset 2 | |
haskell-indentation-ifte-offset 2)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment