diff options
Diffstat (limited to 'docs/user')
-rw-r--r-- | docs/user/readme.adoc | 16 |
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 | |||
20 | We are not there yet, so some editor specific setup is required. | 20 | We are not there yet, so some editor specific setup is required. |
21 | 21 | ||
22 | Additionally, rust-analyzer needs sources of the standard library. | 22 | Additionally, rust-analyzer needs sources of the standard library. |
23 | This commands adds them: | 23 | If the source code is not present, rust-analyzer will attempt to install it automatically. |
24 | |||
25 | To 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 | ||
68 | Note that installing via `xtask install` does not work for VS Code Remote, instead you'll need to install the `.vsix` manually. | 70 | Note 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 | ||
72 | Other editors generally require `ra_lsp_server` binary to be in `$PATH`. | 74 | Other editors generally require `rust-analyzer` binary to be in `$PATH`. |
73 | You can download pre-build binary from | 75 | You can download pre-build binary from |
74 | https://github.com/rust-analyzer/rust-analyzer/releases[relases] | 76 | https://github.com/rust-analyzer/rust-analyzer/releases[releases] |
75 | page, or you can install it from source using the following command: | 77 | page, 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: | |||
100 | 2. Run `:CocInstall coc-rust-analyzer` to install | 102 | 2. 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 | ---- |
117 | let g:LanguageClient_serverCommands = { | 119 | let 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": [ |