[haskell] Split out haskell config into new file

This commit is contained in:
Vincent Ambo 2015-01-16 14:42:31 +01:00
parent a21aeac72c
commit e5ece0c35a
No known key found for this signature in database
GPG key ID: 66F505681DB8F43B
3 changed files with 35 additions and 26 deletions

View file

@ -75,7 +75,7 @@
bindings bindings
eshell-setup eshell-setup
clojure clojure
haskell haskell-setup
)) ))
(add-to-list 'load-path (concat user-emacs-directory "scripts")) (add-to-list 'load-path (concat user-emacs-directory "scripts"))

34
init/haskell-setup.el Normal file
View file

@ -0,0 +1,34 @@
(require 'haskell-mode)
;; Setup for Haskell mode
(add-hook 'haskell-mode-hook 'interactive-haskell-mode)
(add-hook 'haskell-mode-hook 'hi2-mode)
;; Bindings
(defun haskell-mode-binding-setup ()
(interactive)
(define-key haskell-mode-map (kbd "C-c C-l") 'haskell-process-load-or-reload)
(define-key haskell-mode-map (kbd "C-c C-c") 'haskell-compile)
(define-key haskell-mode-map (kbd "C-r") 'haskell-interactive-bring)
(define-key haskell-mode-map (kbd "SPC") 'haskell-mode-contextual-space))
(eval-after-load "haskell-mode"
'(haskell-mode-binding-setup))
(eval-after-load "haskell-cabal"
'(define-key haskell-cabal-mode-map (kbd "C-c C-c") 'haskell-compile))
;; Settings
(setq haskell-interactive-popup-errors nil
haskell-stylish-on-save t
haskell-tags-on-save t
haskell-process-suggest-remove-import-types t
haskell-process-auto-import-loaded-modules t
haskell-process-log t
haskell-process-type 'ghci
haskell-process-show-debug-tips nil)
(provide 'haskell-setup)

View file

@ -1,25 +0,0 @@
(require 'haskell-mode)
;; Setup for Haskell mode
;; Bindings
(eval-after-load "haskell-mode"
'(define-key haskell-mode-map (kbd "C-c C-c") 'haskell-compile))
(eval-after-load "haskell-cabal"
'(define-key haskell-cabal-mode-map (kbd "C-c C-c") 'haskell-compile))
(add-hook 'haskell-mode-hook 'hi2-mode)
;; Settings
(setq haskell-interactive-popup-errors t
haskell-stylish-on-save t
haskell-tags-on-save t
haskell-process-suggest-remove-import-types t
haskell-process-auto-import-loaded-modules t
haskell-process-log t
haskell-process-type 'cabal-repl)
(provide 'haskell)