From 96cf15be7e8ec6f05262d6e977f8b26043299312 Mon Sep 17 00:00:00 2001 From: gered Date: Sun, 8 Dec 2024 19:13:43 -0500 Subject: [PATCH] add rust packages --- emacs.d/lang-modes.el | 19 +++++++++++++++++++ emacs.d/ui.el | 1 + 2 files changed, 20 insertions(+) diff --git a/emacs.d/lang-modes.el b/emacs.d/lang-modes.el index 67eba05..7efb80f 100644 --- a/emacs.d/lang-modes.el +++ b/emacs.d/lang-modes.el @@ -49,4 +49,23 @@ (setq-default c-ts-mode-indent-style 'linux) (setq-default c-ts-mode-indent-offset tab-width)) +(use-package rust-mode + :ensure t + :bind + (("C-c C-r C-r" . 'lsp-rust-analyzer-run) + ("C-c C-r C-e" . 'lsp-rust-analyzer-rerun) + ("C-c C-r C-d" . 'lsp-rust-analyzer-debug) + ("C-c C-r C-t" . 'lsp-rust-analyzer-related-tests)) + :init + (setq rust-mode-treesitter-derive t)) +(use-package rustic + :ensure t + :after rust-mode) + +(use-package cargo + :ensure t + :after rustic + :init + (add-hook 'rust-mode-hook 'cargo-minor-mode) + (add-hook 'rust-ts-mode-hook 'cargo-minor-mode)) diff --git a/emacs.d/ui.el b/emacs.d/ui.el index 46ff6a0..62f9ec5 100644 --- a/emacs.d/ui.el +++ b/emacs.d/ui.el @@ -155,6 +155,7 @@ '("\\*Messages\\*" "Output\\*$" "\\*Async Shell Command\\*" + "^\\*Cargo" ;;help-mode compilation-mode)) (popper-mode t)