Unnamed repository; edit this file 'description' to name the repository.
add openDocs to context menu. add further restrictions to context menu when clauses to prevent irrelevant commands in non-rust files
jmviz 2023-02-18
parent a6603fc · commit ed1f467
-rw-r--r--editors/code/package.json7
1 files changed, 6 insertions, 1 deletions
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"
}
]
},