[Emacs] Allow haskell-mode setups with and without lsp
This commit is contained in:
parent
ea828a298f
commit
e937e7ac5c
@ -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
|
||||||
|
(:map haskell-mode-map
|
||||||
("C-c h" . haskell-hoogle))
|
("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-notify-p t
|
|
||||||
;; Remove annoying error popups
|
|
||||||
haskell-interactive-popup-errors nil
|
haskell-interactive-popup-errors nil
|
||||||
;; Better import handling
|
|
||||||
haskell-process-suggest-remove-import-lines t
|
|
||||||
haskell-process-auto-import-loaded-modules nil
|
haskell-process-auto-import-loaded-modules nil
|
||||||
|
haskell-process-show-overlays nil
|
||||||
haskell-stylish-on-save nil
|
haskell-stylish-on-save nil
|
||||||
haskell-tags-on-save t
|
haskell-tags-on-save t
|
||||||
haskell-mode-stylish-haskell-path "brittany"
|
|
||||||
haskell-mode-stylish-haskell-args '("-")
|
|
||||||
haskell-indent-offset 2)
|
haskell-indent-offset 2)
|
||||||
|
|
||||||
(require 'flycheck)
|
(require 'flycheck)
|
||||||
(delq 'haskell-stack-ghc flycheck-checkers)
|
(cl-loop for checker in '(haskell-stack-ghc haskell-ghc haskell-hlint)
|
||||||
(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)))
|
do (delq checker flycheck-checkers))))
|
||||||
#+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
|
||||||
|
Loading…
Reference in New Issue
Block a user