-
Notifications
You must be signed in to change notification settings - Fork 1
/
haskell.el
33 lines (25 loc) · 871 Bytes
/
haskell.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
;;; haskel.el -- setup haskell lsp for emacs
;;; commentary:
;;; code:
(setenv "PATH" (concat (getenv "HOME") "/.ghcup/bin:" (getenv "HOME") "/.local/bin:" "/usr/local/bin:" (getenv "PATH")))
(setq exec-path
(reverse
(append
(reverse exec-path)
(list (concat (getenv "HOME") "/.ghcup/bin" (getenv "HOME") "/.local/bin") "/usr/local/bin" ))))
(use-package lsp-mode
:ensure t
:hook (haskell-mode . lsp)
:commands lsp)
(use-package lsp-haskell
:ensure t
:config
;; :mode ("\\.cabal\\" "\\.hs\\")
(setq lsp-haskell-server-path "haskell-language-server-wrapper")
(setq lsp-haskell-server-args ())
;; Comment/uncomment this line to see interactions between lsp client/server.
(setq lsp-log-io t))
(add-hook 'haskell-mode-hook #'lsp)
(add-hook 'haskell-literate-mode-hook #'lsp)
(provide 'haskell)
;;; haskell.el ends here