Add the haskell interactive mode to haskell-support

This commit is contained in:
Sameer Rahmani 2024-05-23 18:51:35 +01:00
parent 5bdd13bf04
commit f803f9b0b8
Signed by: lxsameer
GPG Key ID: 8741FACBF412FFA5
2 changed files with 28 additions and 7 deletions

View File

@ -29,11 +29,22 @@
"Setup the language server for MODE `haskell-mode'."
(require 'eglot)
;; This is just a referece for the future
;; (setq-default eglot-workspace-configuration
;; '((haskell
;; (plugin
;; (stan
;; (globalOn . :json-false))))))
(setq-default eglot-workspace-configuration
(mapcar
(lambda (x) `(haskell
(plugin
(,x
(globalOn . :json-true)))))
'(ghcide-code-actions-fill-holes
ghcide-completions
ghcide-hover-and-symbols
ghcide-code-actions-type-signatures
ghcide-code-actions-bindings
ghcide-code-actions-imports-exports
class
hlint
splice
stan)))
(eglot-ensure))
@ -45,6 +56,9 @@
:config
(require 'haskell)
(defun haskell-setup-outline-mode ()
(make-local-variable 'outline-regexp)
(setq outline-regexp "\\`\\|\\s-+\\S-"))
:custom
(eglot-autoshutdown t) ;; shutdown language server after closing last file
@ -54,8 +68,16 @@
(haskell-mode . fg42/ensure-lang-server)
(haskell-mode . fg42/setup-completion)
(haskell-mode . flyspell-prog-mode)
(haskell-mode . interactive-haskell-mode)
(haskell-mode . turn-on-haskell-doc-mode)
(haskell-mode . haskell-indent-mode)
(haskell-mode . haskell-setup-outline-mode)
:bind ("C-c C-c" . haskell-compile))
:bind
(:map haskell-mode-map
("M-n" . haskell-goto-next-error)
("M-p" . haskell-goto-prev-error)
("C-c C-c" . haskell-compile)))
(use! haskell-cabal-mode

View File

@ -34,7 +34,6 @@ shipped with Emacs."
:commands eglot-ensure)
(use! eldoc-box
"View eldoc stuff in a frame."
:commands eldoc-box-hover-mode