Skip to content

Instantly share code, notes, and snippets.

@shapr
Created May 30, 2019 20:04
Show Gist options
  • Save shapr/d359a91c90419f5f5e99dfce338258e8 to your computer and use it in GitHub Desktop.
Save shapr/d359a91c90419f5f5e99dfce338258e8 to your computer and use it in GitHub Desktop.
parts of my emacs config specific to haskell, with use-package prelude
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(package-initialize)
;; make sure use-package is installed
(require 'package)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/")
'("gnu" . "http://elpa.gnu.org/packages/")
)
(unless package-archive-contents
(package-refresh-contents))
(when (not (package-installed-p `use-package))
(package-install 'use-package))
;; haskell specific below here
;; haskell
(use-package haskell-mode
:ensure t
:init
(progn
(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
(add-hook 'haskell-mode-hook 'interactive-haskell-mode)
(setq haskell-process-args-cabal-new-repl
'("--ghc-options=-ferror-spans -fshow-loaded-modules"))
(setq haskell-process-type 'cabal-new-repl)
(setq haskell-stylish-on-save 't)
(setq haskell-tags-on-save 't)
))
(use-package flycheck-haskell
:ensure t
:config
(add-hook 'flycheck-mode-hook #'flycheck-haskell-setup)
(eval-after-load 'haskell-mode-hook 'flycheck-mode))
(use-package flymake-hlint
:ensure t
:config
(add-hook 'haskell-mode-hook 'flymake-hlint-load))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment