refactor haskell stuff
authorRamakrishnan Muthukrishnan <ram@acano.com>
Sat, 23 Jul 2016 15:17:29 +0000 (20:47 +0530)
committerRamakrishnan Muthukrishnan <ram@acano.com>
Sat, 23 Jul 2016 15:18:30 +0000 (20:48 +0530)
init.el
packages.el

diff --git a/init.el b/init.el
index 7cdcceedf84b1c8c4949677e3e94667d6e73033e..949bbdf771d28954e44da5e6809f2017e5654815 100644 (file)
--- a/init.el
+++ b/init.el
@@ -77,9 +77,6 @@
 ;; switch to ERC with Ctrl+c e
 (global-set-key (kbd "C-c e") 'start-erc) ;; ERC
 
-;; Haskell intero mode
-(add-hook 'haskell-mode-hook 'intero-mode)
-
 ;; ido
 (setq ido-enable-flex-matching t)
 (setq ido-everywhere t)
 (setq c-default-style "k&r"
       c-basic-offset 4)
 
+;; haskell
+(add-hook 'haskell-mode-hook #'hindent-mode)
+
+(eval-after-load 'haskell-mode
+  '(define-key haskell-mode-map [f8] 'haskell-navigate-imports))
+
+;;; ghc-mod
+(let ((my-cabal-path (expand-file-name "~/.cabal/bin")))
+  (setenv "PATH" (concat my-cabal-path ":" (getenv "PATH")))
+  (add-to-list 'exec-path my-cabal-path))
+
+(autoload 'ghc-init "ghc" nil t)
+(autoload 'ghc-debug "ghc" nil t)
+(add-hook 'haskell-mode-hook (lambda () (ghc-init)))
+
 ;; hlint
 (add-to-list 'load-path "~/.emacs.d/hs-lint")
 (require 'hs-lint)
 (add-to-list 'which-func-modes '(c-mode c++-mode rust-mode haskell-mode))
 
 ;; flysheck
-(add-hook 'after-init-hook #'global-flycheck-mode)
+;; (add-hook 'after-init-hook #'global-flycheck-mode)
 
 
index 63657d08eb3c871c2235d843d4caf3f1fbcdcc06..e9df4f92fb170c73ff6dd18b8b977626f395f205 100644 (file)
@@ -22,6 +22,7 @@
 (setq package-list '(go-mode
                      rust-mode
                      haskell-mode
+                     hindent
                      ghc
                      restclient
                      tangotango-theme