Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Hlint with intero on emacs

I can't get hlint suggestions to appear in emacs using intero.

  • I have a new installation of emacs 24.5
  • I added the intero stuff at here into new ~/.emacs file
  • I've done nothing else to emacs.

I've read that the solution is:

(flycheck-add-next-checker 'intero
                           '(warning . haskell-hlint))

But I don't know what I'm supposed to do with this. If I add it to my ~/.emacs file then emacs fails on start up.

(The rest seems OK - intero starts when I open a Haskell file - errors are immediately flagged as I type.)

How do I get Hlint suggestions to appear?

like image 722
BillyBadBoy Avatar asked Nov 03 '16 11:11

BillyBadBoy


1 Answers

Fixed by adding this to my ~/.emacs file:

;; do linting on-the-fly 
(with-eval-after-load 'intero
  (flycheck-add-next-checker 'intero '(warning . haskell-hlint))
)

(The full ~/.emacs file can be viewed here)

like image 140
BillyBadBoy Avatar answered Oct 09 '22 02:10

BillyBadBoy