[Emacs] Allow haskell-mode setups with and without lsp

This commit is contained in:
Ivan Malison 2019-07-10 13:33:37 -07:00
parent ea828a298f
commit e937e7ac5c
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8

View File

@ -2799,37 +2799,41 @@ The following is taken from [[https://github.com/syl20bnr/spacemacs/blob/a650877
#+END_SRC #+END_SRC
*** haskell *** haskell
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(defvar imalison:use-lsp-haskell nil)
(defvar imalison:dfinity nil)
(use-package haskell-mode (use-package haskell-mode
:commands haskell-mode :commands haskell-mode
:bind (:map haskell-mode-map :bind
("C-c h" . haskell-hoogle)) (:map haskell-mode-map
("C-c h" . haskell-hoogle))
:preface
(progn
(defun imalison:haskell-mode ()
(turn-on-haskell-indent)
(when imalison:dfinity
(setq
haskell-mode-stylish-haskell-path "brittany"
haskell-mode-stylish-haskell-args '("-")))
(when imalison:use-lsp-haskell
(lsp))))
:config :config
(progn (progn
(setq haskell-hoogle-command "hoogle")
(setq (setq
;; Use notify.el (if you have it installed) at the end of running haskell-hoogle-command "hoogle"
;; Cabal commands or generally things worth notifying. haskell-interactive-popup-errors nil
haskell-notify-p t haskell-process-auto-import-loaded-modules nil
;; Remove annoying error popups haskell-process-show-overlays nil
haskell-interactive-popup-errors nil haskell-stylish-on-save nil
;; Better import handling haskell-tags-on-save t
haskell-process-suggest-remove-import-lines t haskell-indent-offset 2)
haskell-process-auto-import-loaded-modules nil
haskell-stylish-on-save nil (require 'flycheck)
haskell-tags-on-save t (cl-loop for checker in '(haskell-stack-ghc haskell-ghc haskell-hlint)
haskell-mode-stylish-haskell-path "brittany" do (delq checker flycheck-checkers))))
haskell-mode-stylish-haskell-args '("-")
haskell-indent-offset 2)
(require 'flycheck)
(delq 'haskell-stack-ghc flycheck-checkers)
(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)))
#+END_SRC #+END_SRC
**** haskell-ide-engine **** haskell-ide-engine (lsp-haskell)
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package lsp-haskell
:disabled t
:config
(add-hook 'haskell-mode-hook 'lsp))
#+END_SRC #+END_SRC
**** intero **** intero
Intero seems to be causing hangs, so it has been disabled Intero seems to be causing hangs, so it has been disabled