forked from FG42/FG42
Setup all the plugins for haskell lsp server
This commit is contained in:
parent
11086cd7c1
commit
4bce452ca7
|
@ -30,21 +30,22 @@
|
|||
(require 'eglot)
|
||||
;; This is just a referece for the future
|
||||
(setq-default eglot-workspace-configuration
|
||||
(mapcar
|
||||
(lambda (x) `(haskell
|
||||
(plugin
|
||||
(,x
|
||||
(globalOn . t)))))
|
||||
'(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)))
|
||||
`((haskell
|
||||
(plugin
|
||||
,@(mapcar
|
||||
(lambda (x)
|
||||
`(,x
|
||||
(globalOn . t)))
|
||||
'(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))
|
||||
|
||||
|
||||
|
@ -56,21 +57,26 @@
|
|||
|
||||
:config
|
||||
(require 'haskell)
|
||||
;; We use lang server for this
|
||||
(setq haskell-stylish-on-save nil)
|
||||
|
||||
;; The upstream default is:
|
||||
;; cabal build --ghc-option=-ferror-spans
|
||||
(setq-default haskell-compile-cabal-build-command "cabal v2-build --ghc-option=-ferror-spans")
|
||||
(setq-default haskell-process-type 'cabal-new-repl)
|
||||
(setq-default haskell-completing-read-function #'completing-read)
|
||||
|
||||
(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
|
||||
(eglot-confirm-server-initiated-edits nil) ;; allow edits without confirmation
|
||||
|
||||
:hook
|
||||
(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-indentation-mode)
|
||||
(haskell-mode . haskell-setup-outline-mode)
|
||||
|
||||
:bind
|
||||
|
|
Loading…
Reference in New Issue