aboutsummaryrefslogtreecommitdiff
path: root/docs/user
diff options
context:
space:
mode:
authorVeetaha <[email protected]>2020-02-09 19:25:24 +0000
committerVeetaha <[email protected]>2020-02-09 19:25:24 +0000
commit3ebbeb46d42dd45f7769fe3e62f4ecf6a06d8409 (patch)
tree9a7af6f493d56a62672e209b8b1d670e5c12956c /docs/user
parente18661f62b884ba970f8b3267400bf4320c7b118 (diff)
docs: more documentation on prebuilt binaries all-editors-wise
Diffstat (limited to 'docs/user')
-rw-r--r--docs/user/README.md62
1 files changed, 40 insertions, 22 deletions
diff --git a/docs/user/README.md b/docs/user/README.md
index 1e7d516c5..3f69a1710 100644
--- a/docs/user/README.md
+++ b/docs/user/README.md
@@ -1,16 +1,26 @@
1[github-releases]: https://github.com/rust-analyzer/rust-analyzer/releases
2
1The main interface to rust-analyzer is the 3The main interface to rust-analyzer is the
2[LSP](https://microsoft.github.io/language-server-protocol/) implementation. To 4[LSP](https://microsoft.github.io/language-server-protocol/) implementation. To
3install lsp server, clone the repository and then run `cargo xtask install 5install lsp server, you have three options:
4--server` (which is shorthand for `cargo install --path 6
5./crates/ra_lsp_server`). This will produce a binary named `ra_lsp_server` which 7* **Preferred and default:** install the plugin/extension for your IDE and it will ask your permission to automatically download the latest lsp server for you from [GitHub releases][github-releases]. (See docs to find out whether this is implemented for your editor below).
6you should be able to use it with any LSP-compatible editor. We use custom 8* Manually download prebuilt binaries from [GitHub releases][github-releases]
7extensions to LSP, so special client-side support is required to take full 9 * `ra_lsp_server-linux` for Linux
8advantage of rust-analyzer. This repository contains support code for VS Code. 10 * `ra_lsp_server-mac` for Mac
9 11 * `ra_lsp_server-windows.exe` for Windows
10``` 12* Clone the repository and build from sources
13```bash
11$ git clone [email protected]:rust-analyzer/rust-analyzer && cd rust-analyzer 14$ git clone [email protected]:rust-analyzer/rust-analyzer && cd rust-analyzer
12$ cargo xtask install --server 15$ cargo xtask install --server # or cargo install --path ./crates/ra_lsp_server
13``` 16```
17
18This way you will get a binary named `ra_lsp_server` (with os suffix for prebuilt binaries)
19which you should be able to use with any LSP-compatible editor.
20
21We make use of custom extensions to LSP, so special client-side support is required to take full
22advantage of rust-analyzer. This repository contains support code for VS Code.
23
14Rust Analyzer needs sources of rust standard library to work, so 24Rust Analyzer needs sources of rust standard library to work, so
15you might also need to execute 25you might also need to execute
16 26
@@ -22,30 +32,38 @@ See [./features.md](./features.md) document for a list of features that are avai
22 32
23## VS Code 33## VS Code
24 34
25Prerequisites: 35### Prerequisites
26 36
27In order to build the VS Code plugin, you need to have node.js and npm with 37You will need the most recent version of VS Code: we don't try to
28a minimum version of 10 installed. Please refer to
29[node.js and npm documentation](https://nodejs.org) for installation instructions.
30
31You will also need the most recent version of VS Code: we don't try to
32maintain compatibility with older versions yet. 38maintain compatibility with older versions yet.
33 39
40In order to build the VS Code plugin from sources, you need to have node.js and npm with
41a minimum version of 12 installed. Please refer to
42[node.js and npm documentation](https://nodejs.org) for installation instructions.
43
34### Installation from prebuilt binaries 44### Installation from prebuilt binaries
35 45
36We ship prebuilt binaries for Linux, Mac and Windows via 46We ship prebuilt binaries for Linux, Mac and Windows via
37[GitHub releases](https://github.com/rust-analyzer/rust-analyzer/releases). 47[GitHub releases][github-releases].
38In order to use them you need to install the client VSCode extension. 48In order to use them you need to install the client VSCode extension.
39 49
40Publishing to VSCode marketplace is currently WIP. Thus, you need to clone the repository and install **only** the client extension via 50Publishing to VS Code marketplace is currently WIP. Thus, you need to manually download
51`rust-analyzer-0.1.0.vsix` file from latest [GitHub release][github-releases].
52
53After you downloaded the `.vsix` file you can install it from the terminal
54
41``` 55```
42$ git clone https://github.com/rust-analyzer/rust-analyzer.git --depth 1 56$ code --install-extension rust-analyzer-0.1.0.vsix
43$ cd rust-analyzer
44$ cargo xtask install --client-code
45``` 57```
46Then open VSCode (or reload the window if it was already running), open some Rust project and you should
47see an info message pop-up.
48 58
59Or open VS Code, press <kbd>Ctrl+Shift+P</kbd>, and search for the following command:
60
61<img width="500px" alt="Install from VSIX command" src="https://user-images.githubusercontent.com/36276403/74108225-c0c11d80-4b80-11ea-9b2a-0a43f09e29af.png">
62
63Press <kbd>Enter</kbd> and go to `rust-analyzer-0.1.0.vsix` file through the file explorer.
64
65Then open some Rust project and you should
66see an info message pop-up.
49 67
50<img height="140px" src="https://user-images.githubusercontent.com/36276403/74103174-a40df100-4b52-11ea-81f4-372c70797924.png" alt="Download now message"/> 68<img height="140px" src="https://user-images.githubusercontent.com/36276403/74103174-a40df100-4b52-11ea-81f4-372c70797924.png" alt="Download now message"/>
51 69