Minor refactor & reformatting across the board

This commit is contained in:
Henrik Lissner 2020-04-08 15:29:29 -04:00
parent 2957f5ff28
commit b78fc4eb76
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
27 changed files with 189 additions and 164 deletions

View file

@ -3,16 +3,16 @@
(use-package! intero
:commands intero-mode
:init
(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.")))))
:hook (haskell-mode-local-vars . +haskell-init-intero-h)
:config
(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."))))
(setq haskell-compile-cabal-build-command "stack build --fast")
(set-lookup-handlers! 'intero-mode :definition #'intero-goto-definition)
(set-company-backend! 'intero-mode 'intero-company)

View file

@ -6,9 +6,8 @@
:config
(when IS-MAC
(setq lsp-haskell-process-path-hie "hie-wrapper"))
;; Does some strange indentation if it pastes in the snippet
(setq-hook! 'haskell-mode-hook yas-indent-line 'fixed)
(when (featurep! +ghcide)
(setq lsp-haskell-process-path-hie "ghcide"
lsp-haskell-process-args-hie nil)))
lsp-haskell-process-args-hie nil))
;; Does some strange indentation if it pastes in the snippet
(setq-hook! 'haskell-mode-hook yas-indent-line 'fixed))