Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 43c7f3c

Browse files
committed
Auto merge of rust-lang#13391 - dvdsk:update-manual, r=lnicola
Update manual now stable can be installed with rustup this a new PR for rust-lang#13374 as `bors squash` seemed to have broken `bors` _______ `rustup` can now install `rust-analyzer` for the stable tool-chain. This commit removes the note that `rustup` can only install for the nightly branch and adjusts the command. I also added a note on how to find the path to the `rust-analyzer` binary when installed using `rustup`, and suggestions on how to work around it not being placed in `~/.cargo/bin`. I thought it would be ideal to point everyone to use `rustup run stable rust-analyzer` to start `rust-analyzer`. That would make it trivial to switch to nightly however I could not get this to work in `nvim` therefore I left it as a suggestion at the end.
2 parents d235373 + 76be44e commit 43c7f3c

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

docs/user/manual.adoc

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,14 +174,25 @@ On Unix, running the editor from a shell or changing the `.desktop` file to set
174174

175175
==== `rustup`
176176

177-
`rust-analyzer` is available in `rustup`, but only in the nightly toolchain:
177+
`rust-analyzer` is available in `rustup`:
178178

179179
[source,bash]
180180
----
181-
$ rustup +nightly component add rust-analyzer-preview
181+
$ rustup component add rust-analyzer
182182
----
183183

184-
However, in contrast to `component add clippy` or `component add rustfmt`, this does not actually place a `rust-analyzer` binary in `~/.cargo/bin`, see https://github.com/rust-lang/rustup/issues/2411[this issue].
184+
However, in contrast to `component add clippy` or `component add rustfmt`, this does not actually place a `rust-analyzer` binary in `~/.cargo/bin`, see https://github.com/rust-lang/rustup/issues/2411[this issue]. You can find the path to the binary using:
185+
[source,bash]
186+
----
187+
$ rustup which --toolchain stable rust-analyzer
188+
----
189+
You can link to there from `~/.cargo/bin` or configure your editor to use the full path.
190+
191+
Alternatively you might be able to configure your editor to start `rust-analyzer` using the command:
192+
[source,bash]
193+
----
194+
$ rustup run stable rust-analyzer
195+
----
185196

186197
==== Arch Linux
187198

0 commit comments

Comments
 (0)