Add support for cabal-fmt to haskell mode
This commit is contained in:
parent
78efcb37f0
commit
e10ea654ac
|
@ -48,6 +48,7 @@ in
|
|||
|
||||
fg42.paths = (with pkgs;[
|
||||
haskell-language-server
|
||||
haskellPackages.cabal-fmt
|
||||
ghc
|
||||
]);
|
||||
|
||||
|
|
|
@ -78,7 +78,8 @@
|
|||
(haskell-mode . turn-on-haskell-doc-mode)
|
||||
(haskell-mode . haskell-indentation-mode)
|
||||
(haskell-mode . haskell-setup-outline-mode)
|
||||
|
||||
(haskell-mode . (lambda ()
|
||||
(require 'haskell-commands)))
|
||||
:bind
|
||||
(:map haskell-mode-map
|
||||
("M-n" . haskell-goto-next-error)
|
||||
|
@ -86,9 +87,18 @@
|
|||
("C-c c" . haskell-compile)))
|
||||
|
||||
|
||||
(cl-defmethod fg42/format-buffer-for ((mode (eql haskell-cabal-mode)))
|
||||
"Use `cabal-fmt' to format the buffer whenever `haskell-cabal-mode' MODE is active."
|
||||
(message "hehehehehehe")
|
||||
(haskell-mode-buffer-apply-command "cabal-fmt"))
|
||||
|
||||
|
||||
(use! haskell-cabal-mode
|
||||
"Cabal integration."
|
||||
:mode ("\\.cabal\\'"))
|
||||
:mode ("\\.cabal\\'")
|
||||
:hook (haskell-cabal-mode . (lambda ()
|
||||
(require 'haskell-commands))))
|
||||
|
||||
|
||||
|
||||
(provide 'fg42/haskell-support)
|
||||
|
|
Loading…
Reference in New Issue