about summary refs log tree commit diff
diff options
context:
space:
mode:
authorjmviz <jmviz@jmviz.dev>2023-02-17 17:41:39 -0500
committerjmviz <jmviz@jmviz.dev>2023-02-17 17:41:39 -0500
commited1f467aabf03a451355b6e0de8de2f6a2e101ce (patch)
treee603d3c4c7493ca11a1929f2b82078c68fc8bb32
parenta6603fc21d50b3386a488c96225b2d1fd492e533 (diff)
downloadrust-ed1f467aabf03a451355b6e0de8de2f6a2e101ce.tar.gz
rust-ed1f467aabf03a451355b6e0de8de2f6a2e101ce.zip
add openDocs to context menu. add further restrictions to context menu when clauses to prevent irrelevant commands in non-rust files
-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 3610e993f82..b206c15f34c 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"
                 }
             ]
         },