From 6d0f1e2e7209e85c1c558bd712d22e359f1f2786 Mon Sep 17 00:00:00 2001 From: vsrs <62505555+vsrs@users.noreply.github.com> Date: Thu, 28 May 2020 16:04:42 +0300 Subject: Add `inRustProject` context documentation. --- docs/user/readme.adoc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'docs/user') diff --git a/docs/user/readme.adoc b/docs/user/readme.adoc index 40ed54809..0631ca883 100644 --- a/docs/user/readme.adoc +++ b/docs/user/readme.adoc @@ -65,6 +65,16 @@ The server binary is stored in: Note that we only support two most recent versions of VS Code. +==== Special `when` clause context for keybindings. +You may use `inRustProject` context to configure keybindings for rust projects only. For example: +[source,json] +---- +{ "key": "ctrl+shift+f5", "command": "workbench.action.debug.restart", "when": "inDebugMode && !inRustProject"}, +{ "key": "ctrl+shift+f5", "command": "rust-analyzer.debug", "when": "inRustProject"}, +{ "key": "ctrl+i", "command": "rust-analyzer.toggleInlayHints", "when": "inRustProject" } +---- +More about `when` clause contexts https://code.visualstudio.com/docs/getstarted/keybindings#_when-clause-contexts[here]. + ==== Updates 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. -- cgit v1.2.3