aboutsummaryrefslogtreecommitdiff
path: root/docs/user
diff options
context:
space:
mode:
authorLaurenČ›iu Nicola <[email protected]>2020-12-20 17:31:08 +0000
committerLaurenČ›iu Nicola <[email protected]>2020-12-20 17:31:08 +0000
commit6fbe22bfbb00ea131b603fac3c24ca552c9c71cd (patch)
treeefd8ef1849e9d2cab2db19774dd4afdb583ef3d6 /docs/user
parent0ecb224d7565d28ad6bd5903e651dd056f73bd89 (diff)
Split lines between sentences
Diffstat (limited to 'docs/user')
-rw-r--r--docs/user/manual.adoc42
1 files changed, 27 insertions, 15 deletions
diff --git a/docs/user/manual.adoc b/docs/user/manual.adoc
index f21806f0b..40f10972f 100644
--- a/docs/user/manual.adoc
+++ b/docs/user/manual.adoc
@@ -46,8 +46,8 @@ You can install the latest release of the plugin from
46https://marketplace.visualstudio.com/items?itemName=matklad.rust-analyzer[the marketplace]. 46https://marketplace.visualstudio.com/items?itemName=matklad.rust-analyzer[the marketplace].
47 47
48Note that the plugin may cause conflicts with the 48Note that the plugin may cause conflicts with the
49https://marketplace.visualstudio.com/items?itemName=rust-lang.rust[official Rust plugin]. It is 49https://marketplace.visualstudio.com/items?itemName=rust-lang.rust[official Rust plugin].
50recommended to disable the Rust plugin when using the rust-analyzer extension. 50It is recommended to disable the Rust plugin when using the rust-analyzer extension.
51 51
52By default, the plugin will prompt you to download the matching version of the server as well: 52By default, the plugin will prompt you to download the matching version of the server as well:
53 53
@@ -74,18 +74,21 @@ Note that we only support two most recent versions of VS Code.
74 74
75==== Updates 75==== Updates
76 76
77The extension will be updated automatically as new versions become available. It will ask your permission to download the matching language server version binary if needed. 77The extension will be updated automatically as new versions become available.
78It will ask your permission to download the matching language server version binary if needed.
78 79
79===== Nightly 80===== Nightly
80 81
81We ship nightly releases for VS Code. To help us out with testing the newest code and follow the bleeding edge of our `master`, please use the following config: 82We ship nightly releases for VS Code.
83To help us out with testing the newest code and follow the bleeding edge of our `master`, please use the following config:
82 84
83[source,json] 85[source,json]
84---- 86----
85{ "rust-analyzer.updates.channel": "nightly" } 87{ "rust-analyzer.updates.channel": "nightly" }
86---- 88----
87 89
88You will be prompted to install the `nightly` extension version. Just click `Download now` and from that moment you will get automatic updates every 24 hours. 90You will be prompted to install the `nightly` extension version.
91Just click `Download now` and from that moment you will get automatic updates every 24 hours.
89 92
90If you don't want to be asked for `Download now` every day when the new nightly version is released add the following to your `settings.json`: 93If you don't want to be asked for `Download now` every day when the new nightly version is released add the following to your `settings.json`:
91[source,json] 94[source,json]
@@ -160,7 +163,8 @@ $ chmod +x ~/.local/bin/rust-analyzer
160 163
161Ensure `~/.local/bin` is listed in the `$PATH` variable. 164Ensure `~/.local/bin` is listed in the `$PATH` variable.
162 165
163Alternatively, you can install it from source using the command below. You'll need the latest stable version of the Rust toolchain. 166Alternatively, you can install it from source using the command below.
167You'll need the latest stable version of the Rust toolchain.
164 168
165[source,bash] 169[source,bash]
166---- 170----
@@ -198,7 +202,8 @@ Emacs support is maintained as part of the https://github.com/emacs-lsp/lsp-mode
198 202
199=== Vim/NeoVim 203=== Vim/NeoVim
200 204
201Prerequisites: You have installed the <<rust-analyzer-language-server-binary,`rust-analyzer` binary>>. Not needed if the extension can install/update it on its own, coc-rust-analyzer is one example. 205Prerequisites: You have installed the <<rust-analyzer-language-server-binary,`rust-analyzer` binary>>.
206Not needed if the extension can install/update it on its own, coc-rust-analyzer is one example.
202 207
203The are several LSP client implementations for vim or neovim: 208The are several LSP client implementations for vim or neovim:
204 209
@@ -270,14 +275,16 @@ Once `neovim/nvim-lspconfig` is installed, use `+lua require'nvim_lsp'.rust_anal
270 275
271Prerequisites: You have installed the <<rust-analyzer-language-server-binary,`rust-analyzer` binary>>. 276Prerequisites: You have installed the <<rust-analyzer-language-server-binary,`rust-analyzer` binary>>.
272 277
273You also need the `LSP` package. To install it: 278You also need the `LSP` package.
279To install it:
274 280
2751. If you've never installed a Sublime Text package, install Package Control: 2811. If you've never installed a Sublime Text package, install Package Control:
276 * Open the command palette (Win/Linux: `ctrl+shift+p`, Mac: `cmd+shift+p`) 282 * Open the command palette (Win/Linux: `ctrl+shift+p`, Mac: `cmd+shift+p`)
277 * Type `Install Package Control`, press enter 283 * Type `Install Package Control`, press enter
2782. In the command palette, run `Package control: Install package`, and in the list that pops up, type `LSP` and press enter. 2842. In the command palette, run `Package control: Install package`, and in the list that pops up, type `LSP` and press enter.
279 285
280Finally, with your Rust project open, in the command palette, run `LSP: Enable Language Server In Project` or `LSP: Enable Language Server Globally`, then select `rust-analyzer` in the list that pops up to enable the rust-analyzer LSP. The latter means that rust-analyzer is enabled by default in Rust projects. 286Finally, with your Rust project open, in the command palette, run `LSP: Enable Language Server In Project` or `LSP: Enable Language Server Globally`, then select `rust-analyzer` in the list that pops up to enable the rust-analyzer LSP.
287The latter means that rust-analyzer is enabled by default in Rust projects.
281 288
282If it worked, you should see "rust-analyzer, Line X, Column Y" on the left side of the bottom bar, and after waiting a bit, functionality like tooltips on hovering over variables should become available. 289If it worked, you should see "rust-analyzer, Line X, Column Y" on the left side of the bottom bar, and after waiting a bit, functionality like tooltips on hovering over variables should become available.
283 290
@@ -285,7 +292,8 @@ If you get an error saying `No such file or directory: 'rust-analyzer'`, see the
285 292
286=== GNOME Builder 293=== GNOME Builder
287 294
288GNOME Builder 3.37.1 and newer has native `rust-analyzer` support. If the LSP binary is not available, GNOME Builder can install it when opening a Rust file. 295GNOME Builder 3.37.1 and newer has native `rust-analyzer` support.
296If the LSP binary is not available, GNOME Builder can install it when opening a Rust file.
289 297
290== Configuration 298== Configuration
291 299
@@ -413,8 +421,8 @@ include::./generated_diagnostic.adoc[]
413 421
414==== Color configurations 422==== Color configurations
415 423
416It is possible to change the foreground/background color of inlay hints. Just add this to your 424It is possible to change the foreground/background color of inlay hints.
417`settings.json`: 425Just add this to your `settings.json`:
418 426
419[source,jsonc] 427[source,jsonc]
420---- 428----
@@ -436,7 +444,8 @@ It is possible to change the foreground/background color of inlay hints. Just ad
436 444
437==== Semantic style customizations 445==== Semantic style customizations
438 446
439You can customize the look of different semantic elements in the source code. For example, mutable bindings are underlined by default and you can override this behavior by adding the following section to your `settings.json`: 447You can customize the look of different semantic elements in the source code.
448For example, mutable bindings are underlined by default and you can override this behavior by adding the following section to your `settings.json`:
440 449
441[source,jsonc] 450[source,jsonc]
442---- 451----
@@ -452,7 +461,9 @@ You can customize the look of different semantic elements in the source code. Fo
452---- 461----
453 462
454==== Special `when` clause context for keybindings. 463==== Special `when` clause context for keybindings.
455You may use `inRustProject` context to configure keybindings for rust projects only. For example: 464You may use `inRustProject` context to configure keybindings for rust projects only.
465For example:
466
456[source,json] 467[source,json]
457---- 468----
458{ 469{
@@ -491,7 +502,8 @@ Or it is possible to specify vars more granularly:
491] 502]
492``` 503```
493 504
494You can use any valid RegExp as a mask. Also note that a full runnable name is something like *run bin_or_example_name*, *test some::mod::test_name* or *test-mod some::mod*, so it is possible to distinguish binaries, single tests, and test modules with this masks: `"^run"`, `"^test "` (the trailing space matters!), and `"^test-mod"` respectively. 505You can use any valid regular expression as a mask.
506Also note that a full runnable name is something like *run bin_or_example_name*, *test some::mod::test_name* or *test-mod some::mod*, so it is possible to distinguish binaries, single tests, and test modules with this masks: `"^run"`, `"^test "` (the trailing space matters!), and `"^test-mod"` respectively.
495 507
496==== Compiler feedback from external commands 508==== Compiler feedback from external commands
497 509