Skip to content

Commit 6d0f1e2

Browse files
authored
Add inRustProject context documentation.
1 parent f3e04fb commit 6d0f1e2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/user/readme.adoc

+10
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,16 @@ The server binary is stored in:
6565

6666
Note that we only support two most recent versions of VS Code.
6767

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

7080
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.

0 commit comments

Comments
 (0)