aboutsummaryrefslogtreecommitdiff
path: root/docs/user
diff options
context:
space:
mode:
Diffstat (limited to 'docs/user')
-rw-r--r--docs/user/readme.adoc16
1 files changed, 9 insertions, 7 deletions
diff --git a/docs/user/readme.adoc b/docs/user/readme.adoc
index 57a8cbe31..74fda0abe 100644
--- a/docs/user/readme.adoc
+++ b/docs/user/readme.adoc
@@ -20,7 +20,9 @@ In theory, one should be able to just install the server binary and have it auto
20We are not there yet, so some editor specific setup is required. 20We are not there yet, so some editor specific setup is required.
21 21
22Additionally, rust-analyzer needs sources of the standard library. 22Additionally, rust-analyzer needs sources of the standard library.
23This commands adds them: 23If the source code is not present, rust-analyzer will attempt to install it automatically.
24
25To add the sources manually, run the following command:
24 26
25```bash 27```bash
26$ rustup component add rust-src 28$ rustup component add rust-src
@@ -62,16 +64,16 @@ To make VS Code use the freshly build server, add this to the settings:
62 64
63[source,json] 65[source,json]
64---- 66----
65{ "rust-analyzer.raLspServerPath": "ra_lsp_server" } 67{ "rust-analyzer.serverPath": "rust-analyzer" }
66---- 68----
67 69
68Note that installing via `xtask install` does not work for VS Code Remote, instead you'll need to install the `.vsix` manually. 70Note that installing via `xtask install` does not work for VS Code Remote, instead you'll need to install the `.vsix` manually.
69 71
70=== Language Server Binary 72=== Language Server Binary
71 73
72Other editors generally require `ra_lsp_server` binary to be in `$PATH`. 74Other editors generally require `rust-analyzer` binary to be in `$PATH`.
73You can download pre-build binary from 75You can download pre-build binary from
74https://github.com/rust-analyzer/rust-analyzer/releases[relases] 76https://github.com/rust-analyzer/rust-analyzer/releases[releases]
75page, or you can install it from source using the following command: 77page, or you can install it from source using the following command:
76 78
77[source,bash] 79[source,bash]
@@ -100,7 +102,7 @@ The are several LSP client implementations for vim:
1002. Run `:CocInstall coc-rust-analyzer` to install 1022. Run `:CocInstall coc-rust-analyzer` to install
101 https://github.com/fannheyward/coc-rust-analyzer[coc-rust-analyzer], 103 https://github.com/fannheyward/coc-rust-analyzer[coc-rust-analyzer],
102 this extension implements _most_ of the features supported in the VSCode extension: 104 this extension implements _most_ of the features supported in the VSCode extension:
103 * same configurations as VSCode extension, `rust-analyzer.raLspServerPath`, `rust-analyzer.enableCargoWatchOnStartup` etc. 105 * same configurations as VSCode extension, `rust-analyzer.serverPath`, `rust-analyzer.enableCargoWatchOnStartup` etc.
104 * same commands too, `rust-analyzer.analyzerStatus`, `rust-analyzer.startCargoWatch` etc. 106 * same commands too, `rust-analyzer.analyzerStatus`, `rust-analyzer.startCargoWatch` etc.
105 * highlighting and inlay_hints are not implemented yet 107 * highlighting and inlay_hints are not implemented yet
106 108
@@ -115,7 +117,7 @@ The are several LSP client implementations for vim:
115[source,vim] 117[source,vim]
116---- 118----
117let g:LanguageClient_serverCommands = { 119let g:LanguageClient_serverCommands = {
118\ 'rust': ['ra_lsp_server'], 120\ 'rust': ['rust-analyzer'],
119\ } 121\ }
120---- 122----
121 123
@@ -140,7 +142,7 @@ Installation:
140[source,json] 142[source,json]
141---- 143----
142"rust-analyzer": { 144"rust-analyzer": {
143 "command": ["ra_lsp_server"], 145 "command": ["rust-analyzer"],
144 "languageId": "rust", 146 "languageId": "rust",
145 "scopes": ["source.rust"], 147 "scopes": ["source.rust"],
146 "syntaxes": [ 148 "syntaxes": [