From b7abf1ae1e7d1b84ddf0accd3ee2eb4ef470b149 Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Sun, 12 Feb 2023 13:51:42 -0500 Subject: [PATCH] ADD haskell flycheck mode to integrate better with cabal/stack --- etc/conf.org | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/etc/conf.org b/etc/conf.org index d626f0f..f8cb432 100644 --- a/etc/conf.org +++ b/etc/conf.org @@ -1083,10 +1083,16 @@ I have also found this to be much simpler and conflicting with other packages su ;; local completions in 'where' and 'let' clauses '((company-capf company-dabbrev-code)))) + ;; flycheck setup (needed to get flycheck to pay attention to flags/extensions + ;; in cabal files) + (use-package flycheck-haskell + :straight t) + (use-package haskell-mode :straight t :hook ((haskell-mode . origami-mode) (haskell-mode . company-mode) + (haskell-mode . flycheck-haskell-setup) (haskell-mode . haskell-indentation-mode) ;; this enables better integration with the running GHCi process ;; NOTE this is NOT the same is haskell-interactive-mode which is used @@ -1115,15 +1121,13 @@ I have also found this to be much simpler and conflicting with other packages su ;; unnecessary to see on the modeline (delight 'subword-mode nil "subword")) + #+END_SRC **** hlint This is an additional syntax checker and requires the =hlint= binary. #+BEGIN_SRC emacs-lisp -(nd/require-bin "hlint" :aur "hlint-bin") - -(nd/when-bin "hlint" - (with-eval-after-load 'haskell - (flycheck-add-next-checker 'haskell-stack-ghc '(t . haskell-hlint)))) +(with-eval-after-load 'haskell + (flycheck-add-next-checker 'haskell-stack-ghc '(t . haskell-hlint))) #+END_SRC **** helper functions Other helper functions that make haskell even more fun.