Seperate Cargo and Rust config and switch to LSP
This commit is contained in:
parent
7c1e0a4391
commit
ed25696aaa
21
config.org
21
config.org
@ -586,13 +586,17 @@
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Rust
|
** 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
|
#+begin_src emacs-lisp
|
||||||
(use-package rust-mode)
|
(use-package rust-mode)
|
||||||
(use-package cargo)
|
#+end_src
|
||||||
(add-hook 'rust-mode-hook 'cargo-minor-mode)
|
|
||||||
|
Then =rust-analyzer= via LSP does the rest :)
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(add-hook 'rust-mode-hook #'lsp-deferred)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Lisps
|
** Lisps
|
||||||
@ -927,6 +931,15 @@
|
|||||||
(use-package meson-mode)
|
(use-package meson-mode)
|
||||||
#+end_src
|
#+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
|
* Backup and Autosave
|
||||||
** Keep $PWD Tidy
|
** Keep $PWD Tidy
|
||||||
Emacs' default behaviour of dumping temporary files in the current
|
Emacs' default behaviour of dumping temporary files in the current
|
||||||
|
Loading…
x
Reference in New Issue
Block a user