From ce1a0626067235b5dc6ee63801b127da52b2ef00 Mon Sep 17 00:00:00 2001 From: finga Date: Thu, 12 Sep 2024 10:43:19 +0200 Subject: [PATCH] lsp-mode: Move rust-mode config for lsp-mode to rust config To decouple rust from the dev config and contain it solely in the rust config, configure the lsp-mode for rust in the rust config. --- .emacs.d/config/dev.el | 3 --- .emacs.d/config/rust.el | 6 ++++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.emacs.d/config/dev.el b/.emacs.d/config/dev.el index 2fc351f..43fa99b 100644 --- a/.emacs.d/config/dev.el +++ b/.emacs.d/config/dev.el @@ -48,9 +48,6 @@ (use-package lsp-mode :ensure t - :hook - (rust-mode . lsp-deferred) - (toml-mode . lsp-deferred) :config (lsp-inlay-hints-mode) (setq lsp-inlay-hint-enable t)) diff --git a/.emacs.d/config/rust.el b/.emacs.d/config/rust.el index 87f9481..29368f7 100644 --- a/.emacs.d/config/rust.el +++ b/.emacs.d/config/rust.el @@ -10,5 +10,11 @@ ;; format code when saving (setq rust-format-on-save t)) +(use-package lsp-mode + :ensure t + :hook + (rust-mode . lsp-deferred) + (toml-mode . lsp-deferred)) + (use-package flycheck-rust :ensure t) (use-package toml-mode :ensure t)