ADD haskell flycheck mode to integrate better with cabal/stack
This commit is contained in:
parent
e2ac704185
commit
b7abf1ae1e
12
etc/conf.org
12
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
|
;; local completions in 'where' and 'let' clauses
|
||||||
'((company-capf company-dabbrev-code))))
|
'((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
|
(use-package haskell-mode
|
||||||
:straight t
|
:straight t
|
||||||
:hook ((haskell-mode . origami-mode)
|
:hook ((haskell-mode . origami-mode)
|
||||||
(haskell-mode . company-mode)
|
(haskell-mode . company-mode)
|
||||||
|
(haskell-mode . flycheck-haskell-setup)
|
||||||
(haskell-mode . haskell-indentation-mode)
|
(haskell-mode . haskell-indentation-mode)
|
||||||
;; this enables better integration with the running GHCi process
|
;; this enables better integration with the running GHCi process
|
||||||
;; NOTE this is NOT the same is haskell-interactive-mode which is used
|
;; 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
|
;; unnecessary to see on the modeline
|
||||||
(delight 'subword-mode nil "subword"))
|
(delight 'subword-mode nil "subword"))
|
||||||
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
**** hlint
|
**** hlint
|
||||||
This is an additional syntax checker and requires the =hlint= binary.
|
This is an additional syntax checker and requires the =hlint= binary.
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(nd/require-bin "hlint" :aur "hlint-bin")
|
|
||||||
|
|
||||||
(nd/when-bin "hlint"
|
|
||||||
(with-eval-after-load 'haskell
|
(with-eval-after-load 'haskell
|
||||||
(flycheck-add-next-checker 'haskell-stack-ghc '(t . haskell-hlint))))
|
(flycheck-add-next-checker 'haskell-stack-ghc '(t . haskell-hlint)))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
**** helper functions
|
**** helper functions
|
||||||
Other helper functions that make haskell even more fun.
|
Other helper functions that make haskell even more fun.
|
||||||
|
|
Loading…
Reference in New Issue