|
41 | 41 | ],
|
42 | 42 | "main": "./out/src/extension",
|
43 | 43 | "contributes": {
|
44 | | - "commands": [ |
45 | | - { |
| 44 | + "commands": [{ |
46 | 45 | "command": "leetcode.deleteCache",
|
47 | 46 | "title": "Delete Cache",
|
48 | 47 | "category": "LeetCode"
|
|
94 | 93 | "title": "Show Problem",
|
95 | 94 | "category": "LeetCode"
|
96 | 95 | },
|
| 96 | + { |
| 97 | + "command": "leetcode.previewProblem", |
| 98 | + "title": "Preview Problem", |
| 99 | + "category": "LeetCode" |
| 100 | + }, |
97 | 101 | {
|
98 | 102 | "command": "leetcode.searchProblem",
|
99 | 103 | "title": "Search Problem",
|
|
120 | 124 | }
|
121 | 125 | ],
|
122 | 126 | "viewsContainers": {
|
123 | | - "activitybar": [ |
124 | | - { |
125 | | - "id": "leetcode", |
126 | | - "title": "LeetCode", |
127 | | - "icon": "resources/LeetCode.svg" |
128 | | - } |
129 | | - ] |
| 127 | + "activitybar": [{ |
| 128 | + "id": "leetcode", |
| 129 | + "title": "LeetCode", |
| 130 | + "icon": "resources/LeetCode.svg" |
| 131 | + }] |
130 | 132 | },
|
131 | 133 | "views": {
|
132 | | - "leetcode": [ |
133 | | - { |
134 | | - "id": "leetCodeExplorer", |
135 | | - "name": "Problems" |
136 | | - } |
137 | | - ] |
| 134 | + "leetcode": [{ |
| 135 | + "id": "leetCodeExplorer", |
| 136 | + "name": "Problems" |
| 137 | + }] |
138 | 138 | },
|
139 | 139 | "menus": {
|
140 | | - "view/title": [ |
141 | | - { |
| 140 | + "view/title": [{ |
142 | 141 | "command": "leetcode.toggleLeetCodeCn",
|
143 | 142 | "when": "view == leetCodeExplorer",
|
144 | 143 | "group": "navigation@0"
|
|
159 | 158 | "group": "navigation@3"
|
160 | 159 | }
|
161 | 160 | ],
|
162 | | - "view/item/context": [ |
163 | | - { |
| 161 | + "view/item/context": [{ |
164 | 162 | "command": "leetcode.showProblem",
|
165 | 163 | "when": "view == leetCodeExplorer && viewItem == problem",
|
166 | 164 | "group": "leetcode@1"
|
167 | | - } |
168 | | - ], |
169 | | - "commandPalette": [ |
| 165 | + }, |
170 | 166 | {
|
171 | | - "command": "leetcode.showProblem", |
172 | | - "when": "never" |
| 167 | + "command": "leetcode.previewProblem", |
| 168 | + "when": "view == leetCodeExplorer && viewItem == problem", |
| 169 | + "group": "leetcode@1" |
173 | 170 | }
|
174 | 171 | ],
|
175 | | - "explorer/context": [ |
176 | | - { |
| 172 | + "commandPalette": [{ |
| 173 | + "command": "leetcode.showProblem", |
| 174 | + "when": "never" |
| 175 | + }], |
| 176 | + "explorer/context": [{ |
177 | 177 | "command": "leetcode.testSolution",
|
178 | 178 | "when": "explorerResourceIsFolder == false",
|
179 | 179 | "group": "leetcode@1"
|
|
184 | 184 | "group": "leetcode@2"
|
185 | 185 | }
|
186 | 186 | ],
|
187 | | - "editor/context": [ |
188 | | - { |
| 187 | + "editor/context": [{ |
189 | 188 | "command": "leetcode.testSolution",
|
190 | 189 | "group": "leetcode@1"
|
191 | 190 | },
|
|
195 | 194 | }
|
196 | 195 | ]
|
197 | 196 | },
|
198 | | - "configuration": [ |
199 | | - { |
200 | | - "title": "LeetCode", |
201 | | - "properties": { |
202 | | - "leetcode.hideSolved": { |
203 | | - "type": "boolean", |
204 | | - "default": false, |
205 | | - "scope": "application", |
206 | | - "description": "Hide solved problems." |
207 | | - }, |
208 | | - "leetcode.showLocked": { |
209 | | - "type": "boolean", |
210 | | - "default": false, |
211 | | - "scope": "application", |
212 | | - "description": "Show locked problems." |
213 | | - }, |
214 | | - "leetcode.defaultLanguage": { |
215 | | - "type": "string", |
216 | | - "enum": [ |
217 | | - "bash", |
218 | | - "c", |
219 | | - "cpp", |
220 | | - "csharp", |
221 | | - "golang", |
222 | | - "java", |
223 | | - "javascript", |
224 | | - "kotlin", |
225 | | - "mysql", |
226 | | - "python", |
227 | | - "python3", |
228 | | - "ruby", |
229 | | - "scala", |
230 | | - "swift" |
231 | | - ], |
232 | | - "scope": "application", |
233 | | - "description": "Default language for solving the problems." |
234 | | - }, |
235 | | - "leetcode.showSetDefaultLanguageHint": { |
236 | | - "type": "boolean", |
237 | | - "default": true, |
238 | | - "scope": "application", |
239 | | - "description": "Show a hint to set the default language." |
240 | | - }, |
241 | | - "leetcode.useWsl": { |
242 | | - "type": "boolean", |
243 | | - "default": false, |
244 | | - "scope": "application", |
245 | | - "description": "Use Node.js inside the Windows Subsystem for Linux." |
246 | | - }, |
247 | | - "leetcode.endpoint": { |
248 | | - "type": "string", |
249 | | - "default": "leetcode", |
250 | | - "scope": "application", |
251 | | - "enum": [ |
252 | | - "leetcode", |
253 | | - "leetcode-cn" |
254 | | - ], |
255 | | - "description": "Endpoint of the user account." |
256 | | - }, |
257 | | - "leetcode.outputFolder": { |
258 | | - "type": "string", |
259 | | - "scope": "application", |
260 | | - "description": "Specify the relative path to save the problem files." |
261 | | - } |
| 197 | + "configuration": [{ |
| 198 | + "title": "LeetCode", |
| 199 | + "properties": { |
| 200 | + "leetcode.hideSolved": { |
| 201 | + "type": "boolean", |
| 202 | + "default": false, |
| 203 | + "scope": "application", |
| 204 | + "description": "Hide solved problems." |
| 205 | + }, |
| 206 | + "leetcode.showLocked": { |
| 207 | + "type": "boolean", |
| 208 | + "default": false, |
| 209 | + "scope": "application", |
| 210 | + "description": "Show locked problems." |
| 211 | + }, |
| 212 | + "leetcode.defaultLanguage": { |
| 213 | + "type": "string", |
| 214 | + "enum": [ |
| 215 | + "bash", |
| 216 | + "c", |
| 217 | + "cpp", |
| 218 | + "csharp", |
| 219 | + "golang", |
| 220 | + "java", |
| 221 | + "javascript", |
| 222 | + "kotlin", |
| 223 | + "mysql", |
| 224 | + "python", |
| 225 | + "python3", |
| 226 | + "ruby", |
| 227 | + "scala", |
| 228 | + "swift" |
| 229 | + ], |
| 230 | + "scope": "application", |
| 231 | + "description": "Default language for solving the problems." |
| 232 | + }, |
| 233 | + "leetcode.showSetDefaultLanguageHint": { |
| 234 | + "type": "boolean", |
| 235 | + "default": true, |
| 236 | + "scope": "application", |
| 237 | + "description": "Show a hint to set the default language." |
| 238 | + }, |
| 239 | + "leetcode.useWsl": { |
| 240 | + "type": "boolean", |
| 241 | + "default": false, |
| 242 | + "scope": "application", |
| 243 | + "description": "Use Node.js inside the Windows Subsystem for Linux." |
| 244 | + }, |
| 245 | + "leetcode.endpoint": { |
| 246 | + "type": "string", |
| 247 | + "default": "leetcode", |
| 248 | + "scope": "application", |
| 249 | + "enum": [ |
| 250 | + "leetcode", |
| 251 | + "leetcode-cn" |
| 252 | + ], |
| 253 | + "description": "Endpoint of the user account." |
| 254 | + }, |
| 255 | + "leetcode.outputFolder": { |
| 256 | + "type": "string", |
| 257 | + "scope": "application", |
| 258 | + "description": "Specify the relative path to save the problem files." |
262 | 259 | }
|
263 | 260 | }
|
264 | | - ] |
| 261 | + }] |
265 | 262 | },
|
266 | 263 | "scripts": {
|
267 | 264 | "vscode:prepublish": "npm run compile",
|
|
0 commit comments