about summary refs log tree commit diff
path: root/init
diff options
context:
space:
mode:
authorVincent Ambo <vincent@kivra.com>2015-01-16T13·42+0100
committerVincent Ambo <vincent@kivra.com>2015-01-16T13·42+0100
commite5ece0c35a3ea0d6cbc155453786e8922ea2ab34 (patch)
tree988bbab1962255a4f776cfcd442482d172a961a5 /init
parenta21aeac72cd3cfd153edfd0bcaf9d1d1b031914a (diff)
[haskell] Split out haskell config into new file
Diffstat (limited to 'init')
-rw-r--r--init/haskell-setup.el34
-rw-r--r--init/haskell.el25
2 files changed, 34 insertions, 25 deletions
diff --git a/init/haskell-setup.el b/init/haskell-setup.el
new file mode 100644
index 000000000000..bd61013c25b8
--- /dev/null
+++ b/init/haskell-setup.el
@@ -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)
diff --git a/init/haskell.el b/init/haskell.el
deleted file mode 100644
index af105e00e8ac..000000000000
--- a/init/haskell.el
+++ /dev/null
@@ -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)