Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify rust-analyzer binary install #4158

Merged
merged 4 commits into from
Apr 26, 2020
Merged

Clarify rust-analyzer binary install #4158

merged 4 commits into from
Apr 26, 2020

Conversation

zoechi
Copy link
Contributor

@zoechi zoechi commented Apr 26, 2020

No description provided.

Comment on lines 97 to 98
You'll need Cargo, xtask, nodejs and npm for this.
Cargo-xtask can be found at https://github.com/matklad/cargo-xtask
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The xtask binary is part of the rust-analyzer repository. It'll automatically build when calling cargo xtask from inside the rust-analyzer folder.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing that out. I changed it.


Other editors generally require the `rust-analyzer` binary to be in `$PATH`.
You can download the pre-built binary from the https://github.com/rust-analyzer/rust-analyzer/releases[releases] page. Typically, you then need to rename the binary for your platform, e.g. `rust-analyzer-mac` if you're on Mac OS, to `rust-analzyer` and make it executable in addition to moving it into a directory in your `$PATH`.

On Linux to install the `rust-analyzer` binary into `~/.cargo/bin` which usually is already added to `$PATH`, this commands could be used
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think putting binaries not installed by cargo into ~/.cargo/bin is a good idea.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What fo you think is a better place?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe ~/.local/bin? There are a lot of programs that install themselves there. It isn't in PATH by default though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I also think this is a better suggestion. I changed it.

because it's contained in the dart-analyzer repo.
----

Ensure `~/cargo/bin` is listed in the `$PATH` variable.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Ensure `~/cargo/bin` is listed in the `$PATH` variable.
Ensure `~/local/bin` is listed in the `$PATH` variable.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.local

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@matklad
Copy link
Member

matklad commented Apr 26, 2020

Thanks @zoechi !

bors r

@bors
Copy link
Contributor

bors bot commented Apr 26, 2020

@bors bors bot merged commit 7a9ba16 into rust-lang:master Apr 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants