Use rustic-mode instead of rust-mode

This commit is contained in:
Gwen Lofman 2021-02-08 11:48:48 -05:00
parent 4efd8da2da
commit c9d18e3868
1 changed files with 21 additions and 3 deletions

View File

@ -204,10 +204,28 @@
;; Rust programming
(use-package rust-mode
:hook (rust-mode . lsp)
(use-package rustic
:bind (:map rustic-mode-map
("M-j" . lsp-ui-imenu)
("M-?" . lsp-find-references)
;; ("C-c C-c l" . flycheck-list-errors)
("C-c C-c a" . lsp-execute-code-action)
("C-c C-c r" . lsp-rename)
("C-c C-c q" . lsp-workspace-restart)
("C-c C-c Q" . lsp-workspace-shutdown)
("C-c C-c s" . lsp-rust-analyzer-status))
:config
(setq rust-format-on-save t))
;; (setq lsp-eldoc-hook nil)
;; (setq lsp-enable-symbol-highlighting nil)
;; (setq lsp-signature-auto-activate nil)
;; comment to disable rustfmt on save
(setq rustic-format-on-save t)
(add-hook 'rustic-mode-hook 'glfmn/rustic-mode-hook))
(defun glfmn/rustic-mode-hook ()
;; so that run C-c C-c C-r works without having to confirm
(setq-local buffer-save-without-query t))
(use-package flycheck-rust
:config (add-hook 'flycheck-mode-hook #'flycheck-rust-setup))