From bc124fae114336f1474cddec6118be9834aca831 Mon Sep 17 00:00:00 2001 From: Patrick Elliott Date: Tue, 26 Jun 2018 19:14:31 +0200 Subject: [PATCH 1/4] removed hindent hook --- modules/lang/haskell/+intero.el | 4 ---- 1 file changed, 4 deletions(-) diff --git a/modules/lang/haskell/+intero.el b/modules/lang/haskell/+intero.el index 3ddbc5ef8..5dc501743 100644 --- a/modules/lang/haskell/+intero.el +++ b/modules/lang/haskell/+intero.el @@ -14,7 +14,3 @@ This is necessary because `intero-mode' doesn't do its own error checks." (add-hook 'haskell-mode-hook #'+haskell|init-intero) :config (set-lookup-handlers! 'intero-mode :definition #'intero-goto-definition)) - - -(def-package! hindent - :hook (haskell-mode . hindent-mode)) From bec2ad48596992ef46ee79c7a7cf288d640d808e Mon Sep 17 00:00:00 2001 From: Patrick Elliott Date: Tue, 26 Jun 2018 19:15:07 +0200 Subject: [PATCH 2/4] factored hindent out as a seperate feature. --- modules/lang/haskell/+hindent.el | 6 ++++++ modules/lang/haskell/config.el | 2 ++ modules/lang/haskell/packages.el | 7 ++++--- 3 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 modules/lang/haskell/+hindent.el diff --git a/modules/lang/haskell/+hindent.el b/modules/lang/haskell/+hindent.el new file mode 100644 index 000000000..c5b751e01 --- /dev/null +++ b/modules/lang/haskell/+hindent.el @@ -0,0 +1,6 @@ +;;; +hindent.el --- description -*- lexical-binding: t; -*- +;;;###if (featurep! +hindent) + +(def-package! hindent + :hook (haskell-mode . hindent-mode)) + diff --git a/modules/lang/haskell/config.el b/modules/lang/haskell/config.el index 7da71bb97..9d7e4b025 100644 --- a/modules/lang/haskell/config.el +++ b/modules/lang/haskell/config.el @@ -3,6 +3,8 @@ (cond ((featurep! +intero) (load! "+intero")) ((featurep! +dante) (load! "+dante"))) +(when (featurep! +hindent) (load! "+hindent")) + ;; ;; Common plugins diff --git a/modules/lang/haskell/packages.el b/modules/lang/haskell/packages.el index 541ed0bcd..dd3cb634d 100644 --- a/modules/lang/haskell/packages.el +++ b/modules/lang/haskell/packages.el @@ -6,7 +6,8 @@ ;; (cond ((featurep! +dante) (package! dante)) - (t - (package! intero) - (package! hindent))) + (t (package! intero))) + +(when (featurep! +hindent) + (package! hindent)) From e727e2041ff9b1657f5e74057da4622c0fa1f932 Mon Sep 17 00:00:00 2001 From: Patrick Elliott Date: Tue, 26 Jun 2018 19:15:35 +0200 Subject: [PATCH 3/4] Added doc check for hindent executable --- modules/lang/haskell/doctor.el | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/lang/haskell/doctor.el b/modules/lang/haskell/doctor.el index b62d40aa1..6840470fa 100644 --- a/modules/lang/haskell/doctor.el +++ b/modules/lang/haskell/doctor.el @@ -3,11 +3,15 @@ (when (featurep! +dante) (unless (executable-find "cabal") - (warn! "Couldn't find cabal, haskell-mode may have issues")) + (warn! "Couldn't find cabal, haskell-mode may have issues.")) (unless (executable-find "hlint") - (warn! "Couldn't find hlint. Flycheck may have issues in haskell-mode/"))) + (warn! "Couldn't find hlint. Flycheck may have issues in haskell-mode."))) (when (featurep! +intero) (unless (executable-find "stack") - (warn! "Couldn't find stack. Intero will not work"))) + (warn! "Couldn't find stack. Intero will not work."))) + +(when (featurep! +hindent) + (unless (executable-find "hindent") + (warn! "Couldn't find hindent. hindent-mode won't work."))) From 19400598b44faf27f877f348184640d61841b19e Mon Sep 17 00:00:00 2001 From: Patrick Elliott Date: Tue, 26 Jun 2018 19:34:36 +0200 Subject: [PATCH 4/4] got rid of hindent as a seperate feature --- modules/lang/haskell/+hindent.el | 6 ------ modules/lang/haskell/config.el | 6 +++--- modules/lang/haskell/doctor.el | 5 ++--- modules/lang/haskell/packages.el | 3 +-- 4 files changed, 6 insertions(+), 14 deletions(-) delete mode 100644 modules/lang/haskell/+hindent.el diff --git a/modules/lang/haskell/+hindent.el b/modules/lang/haskell/+hindent.el deleted file mode 100644 index c5b751e01..000000000 --- a/modules/lang/haskell/+hindent.el +++ /dev/null @@ -1,6 +0,0 @@ -;;; +hindent.el --- description -*- lexical-binding: t; -*- -;;;###if (featurep! +hindent) - -(def-package! hindent - :hook (haskell-mode . hindent-mode)) - diff --git a/modules/lang/haskell/config.el b/modules/lang/haskell/config.el index 9d7e4b025..9b44c7531 100644 --- a/modules/lang/haskell/config.el +++ b/modules/lang/haskell/config.el @@ -3,13 +3,13 @@ (cond ((featurep! +intero) (load! "+intero")) ((featurep! +dante) (load! "+dante"))) -(when (featurep! +hindent) (load! "+hindent")) - - ;; ;; Common plugins ;; +(def-package! hindent + :hook (haskell-mode . hindent-mode)) + (after! haskell-mode (set-repl-handler! 'haskell-mode #'switch-to-haskell) (add-to-list 'completion-ignored-extensions ".hi")) diff --git a/modules/lang/haskell/doctor.el b/modules/lang/haskell/doctor.el index 6840470fa..91ac803ee 100644 --- a/modules/lang/haskell/doctor.el +++ b/modules/lang/haskell/doctor.el @@ -11,7 +11,6 @@ (unless (executable-find "stack") (warn! "Couldn't find stack. Intero will not work."))) -(when (featurep! +hindent) - (unless (executable-find "hindent") - (warn! "Couldn't find hindent. hindent-mode won't work."))) +(unless (executable-find "hindent") + (warn! "Couldn't find hindent. hindent-mode won't work.")) diff --git a/modules/lang/haskell/packages.el b/modules/lang/haskell/packages.el index dd3cb634d..f70614cb8 100644 --- a/modules/lang/haskell/packages.el +++ b/modules/lang/haskell/packages.el @@ -8,6 +8,5 @@ (package! dante)) (t (package! intero))) -(when (featurep! +hindent) - (package! hindent)) +(package! hindent)