From f3e04fbbabe2887542a9bb57fffcabc7cb50d406 Mon Sep 17 00:00:00 2001 From: vsrs Date: Wed, 27 May 2020 19:40:13 +0300 Subject: Add `inRustProject` when-clause for commands. --- editors/code/package.json | 66 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 65 insertions(+), 1 deletion(-) (limited to 'editors/code/package.json') 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" + } + ] + } } } -- cgit 1.4.1-3-g733a5