aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorvsrs <[email protected]>2020-05-08 17:34:34 +0100
committervsrs <[email protected]>2020-05-08 17:34:34 +0100
commit0ef17ef1ee9fb0ce7149176d12f4d225f6d01401 (patch)
treefa2f168120f36f8dbef5dc1e85fea0c0071639c2 /docs
parent1be6320ea6cf7830195f80681fa0f43cc340da7e (diff)
parentd3eb9d8eafbebca7da95fa8a4813b92eb5080500 (diff)
Merge remote-tracking branch 'upstream/master' into uniformed_debug_lens
# Conflicts: # editors/code/src/commands/runnables.ts
Diffstat (limited to 'docs')
-rw-r--r--docs/user/assists.md12
-rw-r--r--docs/user/readme.adoc25
2 files changed, 21 insertions, 16 deletions
diff --git a/docs/user/assists.md b/docs/user/assists.md
index ee515949e..692fd4f52 100644
--- a/docs/user/assists.md
+++ b/docs/user/assists.md
@@ -241,6 +241,18 @@ fn main() {
241} 241}
242``` 242```
243 243
244## `change_return_type_to_result`
245
246Change the function's return type to Result.
247
248```rust
249// BEFORE
250fn foo() -> i32┃ { 42i32 }
251
252// AFTER
253fn foo() -> Result<i32, > { Ok(42i32) }
254```
255
244## `change_visibility` 256## `change_visibility`
245 257
246Adds or changes existing visibility specifier. 258Adds or changes existing visibility specifier.
diff --git a/docs/user/readme.adoc b/docs/user/readme.adoc
index 69f5b13d6..f6ce0accf 100644
--- a/docs/user/readme.adoc
+++ b/docs/user/readme.adoc
@@ -61,7 +61,7 @@ The server binary is stored in:
61 61
62* Linux: `~/.config/Code/User/globalStorage/matklad.rust-analyzer` 62* Linux: `~/.config/Code/User/globalStorage/matklad.rust-analyzer`
63* macOS: `~/Library/Application Support/Code/User/globalStorage/matklad.rust-analyzer` 63* macOS: `~/Library/Application Support/Code/User/globalStorage/matklad.rust-analyzer`
64* Windows: `%APPDATA%\Code\User\globalStorage` 64* Windows: `%APPDATA%\Code\User\globalStorage\matklad.rust-analyzer`
65 65
66Note that we only support the latest version of VS Code. 66Note that we only support the latest version of VS Code.
67 67
@@ -139,17 +139,16 @@ If your editor can't find the binary even though the binary is on your `$PATH`,
139 139
140==== Arch Linux 140==== Arch Linux
141 141
142The `rust-analyzer` binary can be installed from AUR (Arch User Repository): 142The `rust-analyzer` binary can be installed from the repos or AUR (Arch User Repository):
143 143
144- https://aur.archlinux.org/packages/rust-analyzer-bin[`rust-analyzer-bin`] (binary from GitHub releases) 144- https://www.archlinux.org/packages/community/x86_64/rust-analyzer/[`rust-analyzer`] (built from latest tagged source)
145- https://aur.archlinux.org/packages/rust-analyzer[`rust-analyzer`] (built from latest tagged source) 145- https://aur.archlinux.org/packages/rust-analyzer-git[`rust-analyzer-git`] (latest Git version)
146- https://aur.archlinux.org/packages/rust-analyzer-git[`rust-analyzer-git`] (latest git version)
147 146
148Install it with AUR helper of your choice, for example: 147Install it with pacman, for example:
149 148
150[source,bash] 149[source,bash]
151---- 150----
152$ yay -S rust-analyzer-bin 151$ pacman -S rust-analyzer
153---- 152----
154 153
155=== Emacs 154=== Emacs
@@ -187,7 +186,7 @@ The are several LSP client implementations for vim or neovim:
187 186
1881. Install LanguageClient-neovim by following the instructions 1871. Install LanguageClient-neovim by following the instructions
189 https://github.com/autozimu/LanguageClient-neovim[here] 188 https://github.com/autozimu/LanguageClient-neovim[here]
190 * The github project wiki has extra tips on configuration 189 * The GitHub project wiki has extra tips on configuration
191 190
1922. Configure by adding this to your vim/neovim config file (replacing the existing Rust-specific line if it exists): 1912. Configure by adding this to your vim/neovim config file (replacing the existing Rust-specific line if it exists):
193+ 192+
@@ -220,17 +219,11 @@ let g:ycm_language_server =
220 219
221==== ALE 220==== ALE
222 221
223To add the LSP server to https://github.com/dense-analysis/ale[ale]: 222To use the LSP server in https://github.com/dense-analysis/ale[ale]:
224 223
225[source,vim] 224[source,vim]
226---- 225----
227call ale#linter#Define('rust', { 226let g:ale_linters = {'rust': ['analyzer']}
228\ 'name': 'rust-analyzer',
229\ 'lsp': 'stdio',
230\ 'executable': 'rust-analyzer',
231\ 'command': '%e',
232\ 'project_root': '.',
233\})
234---- 227----
235 228
236==== nvim-lsp 229==== nvim-lsp