Minor comment revision & general code reformatting

This commit is contained in:
Henrik Lissner 2019-07-23 17:30:32 +02:00
parent be46d31866
commit 9eaee096c8
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
3 changed files with 24 additions and 18 deletions

View file

@ -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.

View file

@ -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)

View file

@ -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