about summary refs log tree commit diff
path: root/editors/code/package.json
diff options
context:
space:
mode:
authorvsrs <vit@conrlab.com>2020-05-27 19:40:13 +0300
committervsrs <vit@conrlab.com>2020-05-27 19:46:23 +0300
commitf3e04fbbabe2887542a9bb57fffcabc7cb50d406 (patch)
tree2a546bc7eb167a5f996b81831472983742515315 /editors/code/package.json
parent94889b6472b6332436235f6074ebc8ae3ac0ef15 (diff)
downloadrust-f3e04fbbabe2887542a9bb57fffcabc7cb50d406.tar.gz
rust-f3e04fbbabe2887542a9bb57fffcabc7cb50d406.zip
Add `inRustProject` when-clause for commands.
Diffstat (limited to 'editors/code/package.json')
-rw-r--r--editors/code/package.json66
1 files changed, 65 insertions, 1 deletions
diff --git a/editors/code/package.json b/editors/code/package.json
index acf3ca4b590..75dbafc05a3 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -694,6 +694,70 @@
                     ]
                 }
             }
-        ]
+        ],
+        "menus": {
+            "commandPalette": [
+                {
+                    "command": "rust-analyzer.syntaxTree",
+                    "when": "inRustProject"
+                },
+                {
+                    "command": "rust-analyzer.expandMacro",
+                    "when": "inRustProject"
+                },
+                {
+                    "command": "rust-analyzer.matchingBrace",
+                    "when": "inRustProject"
+                },
+                {
+                    "command": "rust-analyzer.parentModule",
+                    "when": "inRustProject"
+                },
+                {
+                    "command": "rust-analyzer.joinLines",
+                    "when": "inRustProject"
+                },
+                {
+                    "command": "rust-analyzer.run",
+                    "when": "inRustProject"
+                },
+                {
+                    "command": "rust-analyzer.debug",
+                    "when": "inRustProject"
+                },
+                {
+                    "command": "rust-analyzer.newDebugConfig",
+                    "when": "inRustProject"
+                },
+                {
+                    "command": "rust-analyzer.analyzerStatus",
+                    "when": "inRustProject"
+                },
+                {
+                    "command": "rust-analyzer.collectGarbage",
+                    "when": "inRustProject"
+                },
+                {
+                    "command": "rust-analyzer.reload",
+                    "when": "inRustProject"
+                },
+                {
+                    "command": "rust-analyzer.onEnter",
+                    "when": "inRustProject"
+                },
+                {
+                    "command": "rust-analyzer.ssr",
+                    "when": "inRustProject"
+                },
+                {
+                    "command": "rust-analyzer.serverVersion",
+                    "when": "inRustProject"
+                },
+                {
+                    "command": "rust-analyzer.toggleInlayHints",
+                    "when": "inRustProject"
+                }
+            ]
+        }
     }
 }