diff --git a/core/core-packages.el b/core/core-packages.el index b95f74c49..3cdfd581a 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -93,18 +93,18 @@ missing) and shouldn't be deleted.") (setq straight-cache-autoloads nil ; we already do this, and better. ;; Doom doesn't encourage you to modify packages in place. Disabling this ;; makes 'doom refresh' instant (once everything set up), which is much - ;; nicer UX than the several seconds modification checks add. + ;; nicer UX than the several seconds modification checks. straight-check-for-modifications nil - ;; We do this ourselves, and a little more comprehensively. + ;; We handle package.el ourselves (and a little more comprehensively) straight-enable-package-integration nil - straight-enable-use-package-integration nil ;; Before switching to straight, `doom-local-dir' would average out at - ;; around 100mb. Afterwards, at around 1gb. With shallow cloning, that is - ;; reduced to ~400mb. This imposes an isuse with packages that require - ;; their git history for certain things to work (like magit and org), but - ;; we're prepared for that. + ;; around 100mb with half Doom's modules at ~230 packages. Afterwards, at + ;; around 1gb. With shallow cloning, that is reduced to ~400mb. This + ;; imposes an issue with packages that require their git history for + ;; certain things to work (like magit and org), but we can deal with that + ;; when we cross that bridge. straight-vc-git-default-clone-depth 1 - ;; Straight's own emacsmirror mirro is a little smaller and faster. + ;; Straight's own emacsmirror mirror is a little smaller and faster. straight-recipes-emacsmirror-use-mirror t ;; Prefix declarations are unneeded bulk added to our autoloads file. Best ;; we just don't have to deal with them at all. diff --git a/modules/lang/haskell/+intero.el b/modules/lang/haskell/+intero.el index f635fd8cf..7c211000c 100644 --- a/modules/lang/haskell/+intero.el +++ b/modules/lang/haskell/+intero.el @@ -4,14 +4,14 @@ (use-package! intero :commands intero-mode :init - (defun +haskell|init-intero () - "Initializes `intero-mode' in haskell-mode, unless stack isn't installed. + (add-hook 'haskell-mode-local-vars-hook + (defun +haskell-init-intero-h () + "Initializes `intero-mode' in haskell-mode, unless stack isn't installed. This is necessary because `intero-mode' doesn't do its own error checks." - (when (derived-mode-p 'haskell-mode) - (if (executable-find "stack") - (intero-mode +1) - (message "Couldn't find stack. Refusing to enable intero-mode.")))) - (add-hook 'haskell-mode-local-vars-hook #'+haskell|init-intero) + (when (derived-mode-p 'haskell-mode) + (if (executable-find "stack") + (intero-mode +1) + (message "Couldn't find stack. Refusing to enable intero-mode."))))) :config (setq haskell-compile-cabal-build-command "stack build --fast") (set-lookup-handlers! 'intero-mode :definition #'intero-goto-definition) diff --git a/modules/lang/haskell/config.el b/modules/lang/haskell/config.el index 6f8b016bd..cde1e66d9 100644 --- a/modules/lang/haskell/config.el +++ b/modules/lang/haskell/config.el @@ -13,9 +13,15 @@ haskell-process-auto-import-loaded-modules t haskell-process-show-overlays (not (featurep! :tools flycheck))) ; redundant with flycheck - (set-lookup-handlers! 'haskell-mode :definition #'haskell-mode-jump-to-def-or-tag) - (set-file-template! 'haskell-mode :trigger #'haskell-auto-insert-module-template :project t) - (set-repl-handler! '(haskell-mode haskell-cabal-mode literate-haskell-mode) #'+haskell/open-repl) + (set-lookup-handlers! 'haskell-mode + :definition #'haskell-mode-jump-to-def-or-tag) + (set-file-template! 'haskell-mode + :trigger #'haskell-auto-insert-module-template + :project t) + (set-repl-handler! '(haskell-mode + haskell-cabal-mode + literate-haskell-mode) + #'+haskell/open-repl) (add-hook! 'haskell-mode-hook #'(haskell-collapse-mode ; support folding haskell code blocks