From ed25696aaaa4fc581c30105321489c6ed6d233a5 Mon Sep 17 00:00:00 2001 From: Camden Dixie O'Brien Date: Fri, 1 Jan 2021 00:00:36 +0000 Subject: [PATCH] Seperate Cargo and Rust config and switch to LSP --- config.org | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/config.org b/config.org index b0eaa58..edef0aa 100644 --- a/config.org +++ b/config.org @@ -586,13 +586,17 @@ #+end_src ** Rust - I never really use Rust without Cargo, so always turn on the minor - mode for Cargo in Rust buffers. + + =rust-mode= provides basic support: #+begin_src emacs-lisp (use-package rust-mode) - (use-package cargo) - (add-hook 'rust-mode-hook 'cargo-minor-mode) + #+end_src + + Then =rust-analyzer= via LSP does the rest :) + + #+begin_src emacs-lisp + (add-hook 'rust-mode-hook #'lsp-deferred) #+end_src ** Lisps @@ -927,6 +931,15 @@ (use-package meson-mode) #+end_src +*** Cargo + I never really use Rust without Cargo, so always turn on the minor + mode for Cargo in Rust buffers. + + #+begin_src emacs-lisp + (use-package cargo) + (add-hook 'rust-mode-hook 'cargo-minor-mode) + #+end_src + * Backup and Autosave ** Keep $PWD Tidy Emacs' default behaviour of dumping temporary files in the current