|
| 1 | +{ |
| 2 | + "$schema": "http://json-schema.org/draft-07/schema#", |
| 3 | + "type": "object", |
| 4 | + "properties": { |
| 5 | + "version": { |
| 6 | + "type": "number", |
| 7 | + "enum": [1] |
| 8 | + }, |
| 9 | + "commands": { |
| 10 | + "type": "object", |
| 11 | + "additionalProperties": { |
| 12 | + "type": "object", |
| 13 | + "required": ["label"], |
| 14 | + "properties": { |
| 15 | + "label": { |
| 16 | + "description": "Label/title of the command", |
| 17 | + "type": "string" |
| 18 | + }, |
| 19 | + "icon": { |
| 20 | + "description": "(Optional) Icon which is used to represent the command in the UI. Either a file path, an object with file paths for dark and light themes, or a theme icon references, like `\\$(zap)`", |
| 21 | + "anyOf": [ |
| 22 | + { |
| 23 | + "type": "string" |
| 24 | + }, |
| 25 | + { |
| 26 | + "type": "object", |
| 27 | + "properties": { |
| 28 | + "light": { |
| 29 | + "description": "Icon path when a light theme is used", |
| 30 | + "type": "string" |
| 31 | + }, |
| 32 | + "dark": { |
| 33 | + "description": "Icon path when a dark theme is used", |
| 34 | + "type": "string" |
| 35 | + } |
| 36 | + } |
| 37 | + } |
| 38 | + ] |
| 39 | + }, |
| 40 | + "enablement": { |
| 41 | + "description": "(Optional) Condition which must be true to enable the command in the UI (menu and keybindings). Does not prevent executing the command by other means, like the `executeCommand`-api", |
| 42 | + "type": "string" |
| 43 | + }, |
| 44 | + "commandPalette": { |
| 45 | + "description": "(Optional) Specifies whether the command should show up in the command palette. Use true to always show, or a when clause to conditionally show", |
| 46 | + "oneOf": [{ "type": "boolean", "enum": [true] }, { "type": "string" }] |
| 47 | + }, |
| 48 | + "menus": { |
| 49 | + "description": "Menu items to include this command in, organized by menu location", |
| 50 | + "type": "object", |
| 51 | + "propertyNames": { |
| 52 | + "$ref": "#/$defs/menuLocations" |
| 53 | + }, |
| 54 | + "additionalProperties": { |
| 55 | + "type": "array", |
| 56 | + "items": { |
| 57 | + "type": "object", |
| 58 | + "properties": { |
| 59 | + "when": { |
| 60 | + "description": "Condition which must be true to show this item", |
| 61 | + "type": "string" |
| 62 | + }, |
| 63 | + "group": { |
| 64 | + "description": "Group into which this item belongs", |
| 65 | + "type": "string" |
| 66 | + }, |
| 67 | + "order": { |
| 68 | + "description": "Ordering of group items", |
| 69 | + "type": "number" |
| 70 | + }, |
| 71 | + "alt": { |
| 72 | + "description": "Alternative command to run if ALT is pressed while invoking", |
| 73 | + "type": "string" |
| 74 | + } |
| 75 | + }, |
| 76 | + "additionalProperties": false |
| 77 | + } |
| 78 | + } |
| 79 | + }, |
| 80 | + "keybindings": { |
| 81 | + "type": "array", |
| 82 | + "items": { |
| 83 | + "type": "object", |
| 84 | + "properties": { |
| 85 | + "args": { |
| 86 | + "description": "Arguments to pass to the command to execute" |
| 87 | + }, |
| 88 | + "key": { |
| 89 | + "description": "Key or key sequence (separate keys with plus-sign and sequences with space, e.g. Ctrl+O and Ctrl+L L for a chord)", |
| 90 | + "type": "string" |
| 91 | + }, |
| 92 | + "mac": { |
| 93 | + "description": "Mac specific key or key sequence", |
| 94 | + "type": "string" |
| 95 | + }, |
| 96 | + "linux": { |
| 97 | + "description": "Linux specific key or key sequence", |
| 98 | + "type": "string" |
| 99 | + }, |
| 100 | + "win": { |
| 101 | + "description": "Windows specific key or key sequence", |
| 102 | + "type": "string" |
| 103 | + }, |
| 104 | + "when": { |
| 105 | + "description": "Condition when the key is active", |
| 106 | + "type": "string" |
| 107 | + } |
| 108 | + } |
| 109 | + } |
| 110 | + } |
| 111 | + } |
| 112 | + } |
| 113 | + }, |
| 114 | + "submenus": { |
| 115 | + "type": "object", |
| 116 | + "additionalProperties": { |
| 117 | + "type": "object", |
| 118 | + "required": ["label"], |
| 119 | + "properties": { |
| 120 | + "label": { |
| 121 | + "description": "Label/title of the submenu", |
| 122 | + "type": "string" |
| 123 | + }, |
| 124 | + "icon": { |
| 125 | + "description": "(Optional) Icon which is used to represent the submenu in the UI. Either a file path, an object with file paths for dark and light themes, or a theme icon references, like `\\$(zap)`", |
| 126 | + "anyOf": [ |
| 127 | + { |
| 128 | + "type": "string" |
| 129 | + }, |
| 130 | + { |
| 131 | + "type": "object", |
| 132 | + "properties": { |
| 133 | + "light": { |
| 134 | + "description": "Icon path when a light theme is used", |
| 135 | + "type": "string" |
| 136 | + }, |
| 137 | + "dark": { |
| 138 | + "description": "Icon path when a dark theme is used", |
| 139 | + "type": "string" |
| 140 | + } |
| 141 | + } |
| 142 | + } |
| 143 | + ] |
| 144 | + }, |
| 145 | + "menus": { |
| 146 | + "description": "Menu items to include this submenu in, organized by menu location", |
| 147 | + "type": "object", |
| 148 | + "propertyNames": { |
| 149 | + "$ref": "#/$defs/menuLocations" |
| 150 | + }, |
| 151 | + "additionalProperties": { |
| 152 | + "type": "array", |
| 153 | + "items": { |
| 154 | + "type": "object", |
| 155 | + "properties": { |
| 156 | + "when": { |
| 157 | + "description": "Condition which must be true to show this item", |
| 158 | + "type": "string" |
| 159 | + }, |
| 160 | + "group": { |
| 161 | + "description": "Group into which this item belongs", |
| 162 | + "type": "string" |
| 163 | + }, |
| 164 | + "order": { |
| 165 | + "description": "Ordering of group items", |
| 166 | + "type": "number" |
| 167 | + }, |
| 168 | + "alt": { |
| 169 | + "description": "Alternative command to run if ALT is pressed while invoking", |
| 170 | + "type": "string" |
| 171 | + } |
| 172 | + }, |
| 173 | + "additionalProperties": false |
| 174 | + } |
| 175 | + } |
| 176 | + } |
| 177 | + } |
| 178 | + } |
| 179 | + }, |
| 180 | + "keybindings": { |
| 181 | + "type": "array", |
| 182 | + "items": { |
| 183 | + "type": "object", |
| 184 | + "required": ["command", "key"], |
| 185 | + "properties": { |
| 186 | + "command": { |
| 187 | + "description": "Command to execute", |
| 188 | + "type": "string" |
| 189 | + }, |
| 190 | + "args": { |
| 191 | + "description": "Arguments to pass to the command to execute" |
| 192 | + }, |
| 193 | + "key": { |
| 194 | + "description": "Key or key sequence (separate keys with plus-sign and sequences with space, e.g. Ctrl+O and Ctrl+L L for a chord)", |
| 195 | + "type": "string" |
| 196 | + }, |
| 197 | + "mac": { |
| 198 | + "description": "Mac specific key or key sequence", |
| 199 | + "type": "string" |
| 200 | + }, |
| 201 | + "linux": { |
| 202 | + "description": "Linux specific key or key sequence", |
| 203 | + "type": "string" |
| 204 | + }, |
| 205 | + "win": { |
| 206 | + "description": "Windows specific key or key sequence", |
| 207 | + "type": "string" |
| 208 | + }, |
| 209 | + "when": { |
| 210 | + "description": "Condition when the key is active", |
| 211 | + "type": "string" |
| 212 | + } |
| 213 | + } |
| 214 | + } |
| 215 | + } |
| 216 | + }, |
| 217 | + "$defs": { |
| 218 | + "menuLocations": { |
| 219 | + "anyOf": [ |
| 220 | + { |
| 221 | + "type": "string", |
| 222 | + "enum": [ |
| 223 | + "commandPalette", |
| 224 | + "comments/comment/title", |
| 225 | + "comments/comment/context", |
| 226 | + "comments/commentThread/title", |
| 227 | + "comments/commentThread/context", |
| 228 | + "editor/title", |
| 229 | + "editor/title/context", |
| 230 | + "editor/title/run", |
| 231 | + "editor/context", |
| 232 | + "editor/context/copy", |
| 233 | + "editor/lineNumber/context", |
| 234 | + "explorer/context", |
| 235 | + "extension/context", |
| 236 | + "git.commit", |
| 237 | + "menuBar/edit/copy", |
| 238 | + "scm/title", |
| 239 | + "scm/sourceControl", |
| 240 | + "scm/change/title", |
| 241 | + "scm/resourceGroup/context", |
| 242 | + "scm/resourceFolder/context", |
| 243 | + "scm/resourceState/context", |
| 244 | + "terminal/title/context", |
| 245 | + "terminal/context", |
| 246 | + "timeline/title", |
| 247 | + "timeline/item/context", |
| 248 | + "view/title", |
| 249 | + "view/item/context", |
| 250 | + "webview/context" |
| 251 | + ] |
| 252 | + }, |
| 253 | + { |
| 254 | + "type": "string", |
| 255 | + "pattern": "^gitlens/.+$" |
| 256 | + } |
| 257 | + ] |
| 258 | + } |
| 259 | + } |
| 260 | +} |
0 commit comments