From: Ramakrishnan Muthukrishnan Date: Wed, 27 Jul 2016 09:34:51 +0000 (+0530) Subject: flycheck-haskell X-Git-Url: https://git.rkrishnan.org/simplejson/encoder.py.html?a=commitdiff_plain;h=7957139f83c4592bdb881f522030652d720e4f53;p=.emacs.d.git flycheck-haskell --- diff --git a/init.el b/init.el index 949bbdf..d45bd44 100644 --- a/init.el +++ b/init.el @@ -31,6 +31,13 @@ ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. + '(flycheck-haskell-runghc-command + (quote + ("stack" "--verbosity" "silent" "runghc" "--no-ghc-package-path" "--"))) + '(haskell-process-auto-import-loaded-modules t) + '(haskell-process-log t) + '(haskell-process-suggest-remove-import-lines t) + '(haskell-process-type (quote cabal-repl)) '(initial-frame-alist (quote ((fullscreen . maximized)))) '(send-mail-function (quote smtpmail-send-it))) @@ -100,10 +107,13 @@ ;; haskell (add-hook 'haskell-mode-hook #'hindent-mode) +(add-hook 'haskell-mode-hook 'flyspell-prog-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"))) @@ -113,6 +123,10 @@ (autoload 'ghc-debug "ghc" nil t) (add-hook 'haskell-mode-hook (lambda () (ghc-init))) +;; flycheck +(eval-after-load 'flycheck + '(add-hook 'flycheck-mode-hook #'flycheck-haskell-setup)) + ;; hlint (add-to-list 'load-path "~/.emacs.d/hs-lint") (require 'hs-lint) @@ -232,6 +246,6 @@ (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)