 ;; Appropriate HLS is assumed to be in scope (by nix-shell)
 (setq lsp-haskell-server-path "haskell-language-server")
 
+;; Use 'cabal-fmt' for .cabal files
+(set-formatter! 'cabal-fmt "cabal-fmt"
+  :modes 'haskell-cabal-mode)
+
 ;; TODO How to organize formatters? brittany is default, and switching using
 ;; config updates is annoying. Also, tools are not picked up from nix-shells
 

(setq +mu4e-backend 'offlineimap
      mu4e-maildir "~/mail"
      mml-secure-openpgp-sign-with-sender t
      mml-secure-openpgp-encrypt-to-self t)
;; Sign mails by default
(add-hook! 'mu4e-compose-mode-hook :append #'mml-secure-message-sign-pgpauto)
;; Load/Refresh main mu4e view on context change

;; (set-formatter! 'stylish-haskell "stylish-haskell"
;;   :modes 'haskell-mode)

;; Use 'fourmolu' as formatter.
(set-formatter! 'fourmolu "fourmolu"
  :modes 'haskell-mode)

;; TODO Formatting via LSP has also problems.. at least in haskell using
;; brittany ("broken pipe")

