added hooks for rust edition

This commit is contained in:
Tanguy Maze 2019-11-19 09:22:07 +01:00
parent f66479518c
commit de05c208be

View File

@ -6,7 +6,7 @@
; By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ ; ; By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ ;
; +#+#+#+#+#+ +#+ ; ; +#+#+#+#+#+ +#+ ;
; Created: 2018/07/09 18:59:05 by tmaze #+# #+# ; ; Created: 2018/07/09 18:59:05 by tmaze #+# #+# ;
; Updated: 2019/11/01 19:19:08 by tmaze ### ########.fr ; ; Updated: 2019/11/05 10:45:00 by tmaze ### ########.fr ;
; ; ; ;
;******************************************************************************; ;******************************************************************************;
@ -80,12 +80,11 @@ There are two things you can do about this warning:
:mode "\\.rs\\'" :mode "\\.rs\\'"
:init :init
(setq rust-format-on-save t)) (setq rust-format-on-save t))
(use-package lsp-mode (use-package lsp-mode
:init :init
(add-hook 'prog-mode-hook 'lsp-mode)) (add-hook 'prog-mode-hook 'lsp-mode)
:hook (rust-mode . (lambda () (lsp))))
(use-package lsp-rust
:after lsp-mode)
(use-package ccls (use-package ccls
:hook ((c-mode c++-mode objc-mode cuda-mode) . :hook ((c-mode c++-mode objc-mode cuda-mode) .
@ -101,6 +100,9 @@ There are two things you can do about this warning:
(use-package lsp-treemacs (use-package lsp-treemacs
:commands lsp-treemacs-errors-list) :commands lsp-treemacs-errors-list)
(use-package cargo
:hook (rust-mode . (lambda () (cargo-minor-mode))))
(setq lsp-prefer-flymake nil) (setq lsp-prefer-flymake nil)
(setenv "ESHELL" (expand-file-name "~/.emacs.d/eshell")) (setenv "ESHELL" (expand-file-name "~/.emacs.d/eshell"))