Skip to content

Commit f20775d

Browse files
committed
docs
1 parent 46292c7 commit f20775d

File tree

1 file changed

+17
-18
lines changed

1 file changed

+17
-18
lines changed

docs/user/manual.adoc

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,7 @@
22
:toc: preamble
33
:sectanchors:
44
:page-layout: post
5-
// https://gist.github.com/dcode/0cfbf2699a1fe9b46ff04c41721dda74#admonitions
6-
:tip-caption: :bulb:
7-
:note-caption: :information_source:
8-
:important-caption: :heavy_exclamation_mark:
9-
:caution-caption: :fire:
10-
:warning-caption: :warning:
5+
:icons: font
116
:source-highlighter: rouge
127
:experimental:
138

@@ -67,16 +62,6 @@ The server binary is stored in:
6762

6863
Note that we only support two most recent versions of VS Code.
6964

70-
==== Special `when` clause context for keybindings.
71-
You may use `inRustProject` context to configure keybindings for rust projects only. For example:
72-
[source,json]
73-
----
74-
{ "key": "ctrl+shift+f5", "command": "workbench.action.debug.restart", "when": "inDebugMode && !inRustProject"},
75-
{ "key": "ctrl+shift+f5", "command": "rust-analyzer.debug", "when": "inRustProject"},
76-
{ "key": "ctrl+i", "command": "rust-analyzer.toggleInlayHints", "when": "inRustProject" }
77-
----
78-
More about `when` clause contexts https://code.visualstudio.com/docs/getstarted/keybindings#_when-clause-contexts[here].
79-
8065
==== Updates
8166

8267
The 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.
@@ -124,10 +109,23 @@ Here are some useful self-diagnostic commands:
124109
* To log all LSP requests, add `"rust-analyzer.trace.server": "verbose"` to the settings and look for `Server Trace` in the panel.
125110
* To enable client-side logging, add `"rust-analyzer.trace.extension": true` to the settings and open the `Console` tab of VS Code developer tools.
126111

112+
==== Special `when` clause context for keybindings.
113+
You may use `inRustProject` context to configure keybindings for rust projects only. For example:
114+
[source,json]
115+
----
116+
{
117+
"key": "ctrl+i",
118+
"command": "rust-analyzer.toggleInlayHints",
119+
"when": "inRustProject"
120+
}
121+
----
122+
More about `when` clause contexts https://code.visualstudio.com/docs/getstarted/keybindings#_when-clause-contexts[here].
123+
127124
=== rust-analyzer Language Server Binary
128125

129126
Other editors generally require the `rust-analyzer` binary to be in `$PATH`.
130-
You can download the pre-built binary from the https://github.com/rust-analyzer/rust-analyzer/releases[releases] page. Typically, you then need to rename the binary for your platform, e.g. `rust-analyzer-mac` if you're on Mac OS, to `rust-analyzer` and make it executable in addition to moving it into a directory in your `$PATH`.
127+
You can download the pre-built binary from the https://github.com/rust-analyzer/rust-analyzer/releases[releases] page.
128+
Typically, you then need to rename the binary for your platform, e.g. `rust-analyzer-mac` if you're on Mac OS, to `rust-analyzer` and make it executable in addition to moving it into a directory in your `$PATH`.
131129

132130
On Linux to install the `rust-analyzer` binary into `~/.local/bin`, this commands could be used
133131

@@ -147,7 +145,8 @@ $ git clone https://github.com/rust-analyzer/rust-analyzer.git && cd rust-analyz
147145
$ cargo xtask install --server
148146
----
149147

150-
If your editor can't find the binary even though the binary is on your `$PATH`, the likely explanation is that it doesn't see the same `$PATH` as the shell, see https://github.com/rust-analyzer/rust-analyzer/issues/1811[this issue]. On Unix, running the editor from a shell or changing the `.desktop` file to set the environment should help.
148+
If your editor can't find the binary even though the binary is on your `$PATH`, the likely explanation is that it doesn't see the same `$PATH` as the shell, see https://github.com/rust-analyzer/rust-analyzer/issues/1811[this issue].
149+
On Unix, running the editor from a shell or changing the `.desktop` file to set the environment should help.
151150

152151
==== Arch Linux
153152

0 commit comments

Comments
 (0)