]> git.rkrishnan.org Git - .emacs.d.git/blobdiff - init.el
refactor haskell stuff
[.emacs.d.git] / init.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)