Skip to content

Commit ecc4869

Browse files
committed
emacs: use lsp for rust and haskell
1 parent 33db063 commit ecc4869

File tree

1 file changed

+33
-23
lines changed

1 file changed

+33
-23
lines changed

.emacs.d/user.el

Lines changed: 33 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -79,34 +79,44 @@
7979
; (function (lambda ()
8080
; (add-hook 'before-save-hook
8181
; 'clang-format-buffer nil t)))))
82-
(setq-default flycheck-disabled-checkers '(haskell-ghc haskell-stack-ghc haskell-hlint))
83-
;; haskell
84-
(use-package yasnippet
85-
:ensure t)
86-
(use-package lsp-mode
87-
:ensure t
88-
:hook (haskell-mode . lsp)
89-
:commands lsp)
90-
(use-package lsp-ui
91-
:ensure t
92-
:commands lsp-ui-mode)
93-
(use-package lsp-haskell
94-
:ensure t
95-
:config
96-
(setq lsp-haskell-server-path "haskell-language-server-wrapper")
97-
(setq lsp-haskell-server-args'("-d"))
98-
;; Comment/uncomment this line to see interactions between lsp client/server.
99-
;;(setq lsp-log-io t)
100-
)
101-
102-
82+
; (setq-default flycheck-disabled-checkers '(haskell-ghc haskell-stack-ghc haskell-hlint))
83+
; ;; haskell
84+
; (use-package yasnippet
85+
; :ensure t)
86+
; (use-package lsp-mode
87+
; :ensure t
88+
; :hook (haskell-mode . lsp)
89+
; :commands lsp)
90+
; (use-package lsp-ui
91+
; :ensure t
92+
; :commands lsp-ui-mode)
93+
; (use-package lsp-haskell
94+
; :ensure t
95+
; :config
96+
; (setq lsp-haskell-server-path "haskell-language-server-wrapper")
97+
; (setq lsp-haskell-server-args'("-d"))
98+
; ;; Comment/uncomment this line to see interactions between lsp client/server.
99+
; ;;(setq lsp-log-io t)
100+
; )
103101

104102
;; rust
105-
(use-package rust-mode
103+
(use-package rustic
106104
:ensure t
107105
:init
108-
(add-hook 'rust-mode-hook (lambda () (setq indent-tabs-mode nil)))
106+
:bind (:map rustic-mode-map
107+
("C-c C-c l" . flycheck-list-errors)
108+
("C-c C-c s" . lsp-rust-analyzer-status))
109+
:config
110+
(setq lsp-eldoc-hook nil)
111+
(setq lsp-enable-symbol-highlighting nil)
112+
(setq lsp-signature-auto-activate nil)
113+
114+
; (setq rustic-format-on-save nil)
115+
; (add-hook 'rustic-mode-hook 'rk/rustic-mode-hook)
109116
)
117+
(defun rk/rustic-mode-hook ()
118+
(setq-local buffer-save-without-query t))
119+
110120

111121
;; ocaml
112122
(setq ngyj/merlin-site-elisp (getenv "MERLIN_SITE_LISP"))

0 commit comments

Comments
 (0)