Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 711fc4c

Browse files
Trung Nguyenjdneo
Trung Nguyen
authored andcommitted
Add LeetCode extension as an activity bar item instead of a panel in Explorer item (LeetCode-OpenSource#38)
1 parent 9b7de4e commit 711fc4c

File tree

2 files changed

+107
-63
lines changed

2 files changed

+107
-63
lines changed

‎package.json‎

Lines changed: 59 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@
3838
],
3939
"main": "./out/src/extension",
4040
"contributes": {
41-
"commands": [
42-
{
41+
"commands": [{
4342
"command": "leetcode.signin",
4443
"title": "Sign in",
4544
"category": "LeetCode"
@@ -90,17 +89,21 @@
9089
"category": "LeetCode"
9190
}
9291
],
92+
"viewsContainers": {
93+
"activitybar": [{
94+
"id": "leetcode",
95+
"title": "LeetCode",
96+
"icon": "resources/LeetCode.svg"
97+
}]
98+
},
9399
"views": {
94-
"explorer": [
95-
{
96-
"id": "leetCodeExplorer",
97-
"name": "LeetCode"
98-
}
99-
]
100+
"leetcode": [{
101+
"id": "leetCodeExplorer",
102+
"name": "LeetCode"
103+
}]
100104
},
101105
"menus": {
102-
"view/title": [
103-
{
106+
"view/title": [{
104107
"command": "leetcode.searchProblem",
105108
"when": "view == leetCodeExplorer",
106109
"group": "navigation@1"
@@ -111,21 +114,16 @@
111114
"group": "navigation@2"
112115
}
113116
],
114-
"view/item/context": [
115-
{
116-
"command": "leetcode.showProblem",
117-
"when": "view == leetCodeExplorer && viewItem == problem",
118-
"group": "leetcode-explorer@1"
119-
}
120-
],
121-
"commandPalette": [
122-
{
123-
"command": "leetcode.showProblem",
124-
"when": "never"
125-
}
126-
],
127-
"explorer/context": [
128-
{
117+
"view/item/context": [{
118+
"command": "leetcode.showProblem",
119+
"when": "view == leetCodeExplorer && viewItem == problem",
120+
"group": "leetcode-explorer@1"
121+
}],
122+
"commandPalette": [{
123+
"command": "leetcode.showProblem",
124+
"when": "never"
125+
}],
126+
"explorer/context": [{
129127
"command": "leetcode.testSolution",
130128
"when": "explorerResourceIsFolder == false",
131129
"group": "file-explorer@1"
@@ -137,46 +135,44 @@
137135
}
138136
]
139137
},
140-
"configuration": [
141-
{
142-
"title": "LeetCode",
143-
"properties": {
144-
"leetcode.showLocked": {
145-
"type": "boolean",
146-
"default": false,
147-
"scope": "window",
148-
"description": "Show locked problems."
149-
},
150-
"leetcode.defaultLanguage": {
151-
"type": "string",
152-
"enum": [
153-
"bash",
154-
"c",
155-
"cpp",
156-
"csharp",
157-
"golang",
158-
"java",
159-
"javascript",
160-
"kotlin",
161-
"mysql",
162-
"python",
163-
"python3",
164-
"ruby",
165-
"scala",
166-
"swift"
167-
],
168-
"scope": "window",
169-
"description": "Default language for solving the problems."
170-
},
171-
"leetcode.showSetDefaultLanguageHint": {
172-
"type": "boolean",
173-
"default": true,
174-
"scope": "window",
175-
"description": "Show a hint to set the default language."
176-
}
138+
"configuration": [{
139+
"title": "LeetCode",
140+
"properties": {
141+
"leetcode.showLocked": {
142+
"type": "boolean",
143+
"default": false,
144+
"scope": "window",
145+
"description": "Show locked problems."
146+
},
147+
"leetcode.defaultLanguage": {
148+
"type": "string",
149+
"enum": [
150+
"bash",
151+
"c",
152+
"cpp",
153+
"csharp",
154+
"golang",
155+
"java",
156+
"javascript",
157+
"kotlin",
158+
"mysql",
159+
"python",
160+
"python3",
161+
"ruby",
162+
"scala",
163+
"swift"
164+
],
165+
"scope": "window",
166+
"description": "Default language for solving the problems."
167+
},
168+
"leetcode.showSetDefaultLanguageHint": {
169+
"type": "boolean",
170+
"default": true,
171+
"scope": "window",
172+
"description": "Show a hint to set the default language."
177173
}
178174
}
179-
]
175+
}]
180176
},
181177
"scripts": {
182178
"vscode:prepublish": "npm run compile",

‎resources/LeetCode.svg‎

Lines changed: 48 additions & 0 deletions
Loading[フレーム]

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /