Merge pull request #5062 from fosskers/colin/module-docs
Rust/Ivy Module Docs
This commit is contained in:
commit
fce08306b1
3 changed files with 36 additions and 8 deletions
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
* Description
|
* Description
|
||||||
This module provides Ivy integration for a variety of Emacs commands, as well as
|
This module provides Ivy integration for a variety of Emacs commands, as well as
|
||||||
a unified interface for project search and replace, powered by ripgrep.
|
a unified interface for project search and replace, powered by [[https://github.com/BurntSushi/ripgrep/][ripgrep]].
|
||||||
|
|
||||||
#+begin_quote
|
#+begin_quote
|
||||||
I prefer ivy over ido for its flexibility. I prefer ivy over helm because it's
|
I prefer ivy over ido for its flexibility. I prefer ivy over helm because it's
|
||||||
|
@ -76,7 +76,7 @@ brew install ripgrep
|
||||||
|
|
||||||
*** Arch Linux
|
*** Arch Linux
|
||||||
#+BEGIN_SRC sh :dir /sudo::
|
#+BEGIN_SRC sh :dir /sudo::
|
||||||
sudo pacman --needed --noconfirm -S ripgrep
|
sudo pacman -S ripgrep
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
*** openSUSE
|
*** openSUSE
|
||||||
|
|
|
@ -9,13 +9,17 @@
|
||||||
- [[#plugins][Plugins]]
|
- [[#plugins][Plugins]]
|
||||||
- [[#hacks][Hacks]]
|
- [[#hacks][Hacks]]
|
||||||
- [[#prerequisites][Prerequisites]]
|
- [[#prerequisites][Prerequisites]]
|
||||||
|
- [[#install][Install]]
|
||||||
|
- [[#arch-linux][Arch Linux]]
|
||||||
|
- [[#general][General]]
|
||||||
|
- [[#other-requirements][Other Requirements]]
|
||||||
- [[#features][Features]]
|
- [[#features][Features]]
|
||||||
- [[#lsp-support-rls-or-rust-analyzer][LSP support (rls or rust-analyzer)]]
|
- [[#lsp-support-rls-or-rust-analyzer][LSP support (rls or rust-analyzer)]]
|
||||||
- [[#format-on-save][Format on save]]
|
- [[#format-on-save][Format on save]]
|
||||||
- [[#keybinds][Keybinds]]
|
- [[#keybinds][Keybinds]]
|
||||||
- [[#configuration][Configuration]]
|
- [[#configuration][Configuration]]
|
||||||
- [[#enable-rls-by-default][Enable RLS by default]]
|
- [[#enable-rls-by-default][Enable RLS by default]]
|
||||||
- [[#enabling-elgot-support-for-rust][Enabling elgot support for Rust]]
|
- [[#enabling-eglot-support-for-rust][Enabling eglot support for Rust]]
|
||||||
- [[#troubleshooting][Troubleshooting]]
|
- [[#troubleshooting][Troubleshooting]]
|
||||||
- [[#errore0670-async-fn-is-not-permitted-in-the-2015-edition][error[E0670]: `async fn` is not permitted in the 2015 edition]]
|
- [[#errore0670-async-fn-is-not-permitted-in-the-2015-edition][error[E0670]: `async fn` is not permitted in the 2015 edition]]
|
||||||
|
|
||||||
|
@ -37,14 +41,38 @@ e.g. ~cargo~.
|
||||||
+ [[https://github.com/racer-rust/emacs-racer][racer]]* (unless =+lsp=)
|
+ [[https://github.com/racer-rust/emacs-racer][racer]]* (unless =+lsp=)
|
||||||
|
|
||||||
** Hacks
|
** Hacks
|
||||||
+ rustic has been modified /not/ to automatically install lsp-mode or elgot if
|
+ rustic has been modified /not/ to automatically install lsp-mode or eglot if
|
||||||
they're missing. Doom expects you to have enabled the =:tools lsp= module
|
they're missing. Doom expects you to have enabled the =:tools lsp= module
|
||||||
yourself.
|
yourself.
|
||||||
|
|
||||||
* Prerequisites
|
* Prerequisites
|
||||||
This module requires ~rust~, which can be acquired through =rustup=:
|
|
||||||
|
|
||||||
~curl https://sh.rustup.rs -sSf | sh~
|
** Install
|
||||||
|
|
||||||
|
This module requires ~rust~, which can be acquired through =rustup=.
|
||||||
|
|
||||||
|
*** Arch Linux
|
||||||
|
|
||||||
|
#+begin_src sh
|
||||||
|
sudo pacman -S rustup
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
See also the Rust article [[https://wiki.archlinux.org/title/Rust#Rustup][on the Arch Wiki]].
|
||||||
|
|
||||||
|
Note that when the Rust /language/ has updates, you are to run =rustup= such that
|
||||||
|
it doesn't upgrade itself:
|
||||||
|
|
||||||
|
#+begin_src sh
|
||||||
|
rustup update --no-self-update
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
*** General
|
||||||
|
|
||||||
|
#+begin_src sh
|
||||||
|
curl https://sh.rustup.rs -sSf | sh
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** Other Requirements
|
||||||
|
|
||||||
Additional requirements depend on the module's configuration:
|
Additional requirements depend on the module's configuration:
|
||||||
|
|
||||||
|
@ -54,7 +82,7 @@ Additional requirements depend on the module's configuration:
|
||||||
(with requires rust nightly edition).
|
(with requires rust nightly edition).
|
||||||
+ Users with =+lsp= enabled will need:
|
+ Users with =+lsp= enabled will need:
|
||||||
+ =rust-analyzer= or =rls=
|
+ =rust-analyzer= or =rls=
|
||||||
+ To use The following commands require:
|
+ Using the following commands requires:
|
||||||
+ ~cargo-process-check~: ~cargo install cargo-check~
|
+ ~cargo-process-check~: ~cargo install cargo-check~
|
||||||
+ ~cargo-process-clippy~: ~rustup component add clippy-preview~
|
+ ~cargo-process-clippy~: ~rustup component add clippy-preview~
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
:desc "all" "a" #'rustic-cargo-test
|
:desc "all" "a" #'rustic-cargo-test
|
||||||
:desc "current test" "t" #'rustic-cargo-current-test))
|
:desc "current test" "t" #'rustic-cargo-current-test))
|
||||||
|
|
||||||
;; If lsp/elgot isn't available, it attempts to install lsp-mode via
|
;; If lsp/eglot isn't available, it attempts to install lsp-mode via
|
||||||
;; package.el. Doom manages its own dependencies through straight so disable
|
;; package.el. Doom manages its own dependencies through straight so disable
|
||||||
;; this behavior to avoid package-not-initialized errors.
|
;; this behavior to avoid package-not-initialized errors.
|
||||||
(defadvice! +rust--dont-install-packages-a (&rest _)
|
(defadvice! +rust--dont-install-packages-a (&rest _)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue