diff --git a/package.json b/package.json index ea85f7c5..78dc811f 100644 --- a/package.json +++ b/package.json @@ -38,8 +38,7 @@ ], "main": "./out/src/extension", "contributes": { - "commands": [ - { + "commands": [{ "command": "leetcode.signin", "title": "Sign in", "category": "LeetCode" @@ -90,17 +89,21 @@ "category": "LeetCode" } ], + "viewsContainers": { + "activitybar": [{ + "id": "leetcode", + "title": "LeetCode", + "icon": "resources/LeetCode.svg" + }] + }, "views": { - "explorer": [ - { - "id": "leetCodeExplorer", - "name": "LeetCode" - } - ] + "leetcode": [{ + "id": "leetCodeExplorer", + "name": "LeetCode" + }] }, "menus": { - "view/title": [ - { + "view/title": [{ "command": "leetcode.searchProblem", "when": "view == leetCodeExplorer", "group": "navigation@1" @@ -111,21 +114,16 @@ "group": "navigation@2" } ], - "view/item/context": [ - { - "command": "leetcode.showProblem", - "when": "view == leetCodeExplorer && viewItem == problem", - "group": "leetcode-explorer@1" - } - ], - "commandPalette": [ - { - "command": "leetcode.showProblem", - "when": "never" - } - ], - "explorer/context": [ - { + "view/item/context": [{ + "command": "leetcode.showProblem", + "when": "view == leetCodeExplorer && viewItem == problem", + "group": "leetcode-explorer@1" + }], + "commandPalette": [{ + "command": "leetcode.showProblem", + "when": "never" + }], + "explorer/context": [{ "command": "leetcode.testSolution", "when": "explorerResourceIsFolder == false", "group": "file-explorer@1" @@ -137,46 +135,44 @@ } ] }, - "configuration": [ - { - "title": "LeetCode", - "properties": { - "leetcode.showLocked": { - "type": "boolean", - "default": false, - "scope": "window", - "description": "Show locked problems." - }, - "leetcode.defaultLanguage": { - "type": "string", - "enum": [ - "bash", - "c", - "cpp", - "csharp", - "golang", - "java", - "javascript", - "kotlin", - "mysql", - "python", - "python3", - "ruby", - "scala", - "swift" - ], - "scope": "window", - "description": "Default language for solving the problems." - }, - "leetcode.showSetDefaultLanguageHint": { - "type": "boolean", - "default": true, - "scope": "window", - "description": "Show a hint to set the default language." - } + "configuration": [{ + "title": "LeetCode", + "properties": { + "leetcode.showLocked": { + "type": "boolean", + "default": false, + "scope": "window", + "description": "Show locked problems." + }, + "leetcode.defaultLanguage": { + "type": "string", + "enum": [ + "bash", + "c", + "cpp", + "csharp", + "golang", + "java", + "javascript", + "kotlin", + "mysql", + "python", + "python3", + "ruby", + "scala", + "swift" + ], + "scope": "window", + "description": "Default language for solving the problems." + }, + "leetcode.showSetDefaultLanguageHint": { + "type": "boolean", + "default": true, + "scope": "window", + "description": "Show a hint to set the default language." } } - ] + }] }, "scripts": { "vscode:prepublish": "npm run compile", diff --git a/resources/LeetCode.svg b/resources/LeetCode.svg new file mode 100644 index 00000000..99109742 --- /dev/null +++ b/resources/LeetCode.svg @@ -0,0 +1,48 @@ + + + +