From ed1f467aabf03a451355b6e0de8de2f6a2e101ce Mon Sep 17 00:00:00 2001 From: jmviz Date: Fri, 17 Feb 2023 17:41:39 -0500 Subject: [PATCH] add openDocs to context menu. add further restrictions to context menu when clauses to prevent irrelevant commands in non-rust files --- editors/code/package.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/editors/code/package.json b/editors/code/package.json index 3610e993f8..b206c15f34 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -1869,8 +1869,13 @@ "editor/context": [ { "command": "rust-analyzer.peekTests", - "when": "inRustProject", + "when": "inRustProject && editorTextFocus && editorLangId == rust", "group": "navigation@1000" + }, + { + "command": "rust-analyzer.openDocs", + "when": "inRustProject && editorTextFocus && editorLangId == rust", + "group": "navigation@1001" } ] },