-
-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathpackage.json
307 lines (307 loc) · 8.39 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
{
"name": "snippet",
"displayName": "Snippet",
"description": "Insert a snippet from cht.sh for Python, JavaScript, Ruby, C#, Go, Rust (and any other language)",
"version": "1.2.0",
"publisher": "vscode-snippet",
"engines": {
"vscode": "^1.74.0"
},
"repository": {
"type": "git",
"url": "https://github.com/mre/vscode-snippet.git"
},
"license": "MIT",
"icon": "contrib/icon.png",
"galleryBanner": {
"color": "#6cfff9",
"theme": "light"
},
"categories": [
"Programming Languages",
"Snippets",
"Other"
],
"tags": [
"python",
"ruby",
"php",
"rust",
"C#",
"go",
"haskell",
"typescript",
"shell",
"javascript",
"node",
"snippet",
"examples",
"documentation",
"help",
"tldr",
"helper",
"cheatsheet"
],
"main": "./out/extension",
"contributes": {
"commands": [
{
"title": "Find",
"command": "snippet.find",
"category": "Snippet"
},
{
"title": "Find for language",
"command": "snippet.findForLanguage",
"category": "Snippet"
},
{
"title": "Find Inplace",
"command": "snippet.findInplace",
"category": "Snippet"
},
{
"title": "Find in new editor window",
"command": "snippet.findInNewEditor",
"category": "Snippet"
},
{
"title": "Find snippet from selected text",
"command": "snippet.findSelectedText",
"category": "Snippet"
},
{
"title": "Show previous answer",
"command": "snippet.showPreviousAnswer",
"category": "Snippet"
},
{
"title": "Show next answer",
"command": "snippet.showNextAnswer",
"category": "Snippet"
},
{
"title": "Toggle comments",
"command": "snippet.toggleComments",
"category": "Snippet"
},
{
"title": "Save snippet",
"command": "snippet.saveSnippet",
"category": "Snippet"
},
{
"title": "Insert snippet",
"command": "snippet.insertSnippet",
"category": "Snippet"
},
{
"title": "Delete",
"command": "snippet.deleteSnippet",
"category": "Snippet"
},
{
"title": "Rename",
"command": "snippet.renameSnippet",
"category": "Snippet"
},
{
"title": "Copy",
"command": "snippet.copySnippet",
"category": "Snippet"
},
{
"title": "Find and copy",
"command": "snippet.findAndCopy",
"category": "Snippet"
},
{
"title": "New Folder",
"command": "snippet.createFolder",
"category": "Snippet",
"icon": {
"light": "assets/icons/add-light.svg",
"dark": "assets/icons/add-dark.svg"
}
},
{
"title": "Restore backups",
"command": "snippet.restoreBackups",
"category": "Snippet",
"icon": {
"light": "assets/icons/history-light.svg",
"dark": "assets/icons/history-dark.svg"
}
}
],
"configuration": {
"title": "Snippet",
"properties": {
"snippet.baseUrl": {
"type": "string",
"default": "https://cht.sh",
"description": "Base URL of the cheat sheet server"
},
"snippet.openInNewEditor": {
"type": "boolean",
"default": true,
"description": "Open snippet result in new editor."
},
"snippet.verbose": {
"type": "boolean",
"default": false,
"description": "Also show explanations for code snippets."
},
"snippet.defaultLanguage": {
"type": "string",
"default": null,
"description": "Programming language name in lower case to use as default language when there is no open editor window."
},
"snippet.title": {
"type": "string",
"default": "[${language}] ${query} (${index})",
"markdownDescription": "Template string of a snippet title. \nYou can use the following variables:\n- ${language} - the programming language\n- ${query} - the snippet query (search text)\n- ${index} - the index of the snippet (e.g. 2 for the third answer)"
},
"snippet.insertWithDoubleClick": {
"type": "boolean",
"default": false,
"description": "Insert snippet with double click."
},
"snippet.showCopySuccessNotification": {
"type": "boolean",
"default": true,
"description": "Whether to show a notification after the snippet is copied to the clipboard."
},
"snippet.saveBackups": {
"type": "boolean",
"default": true,
"description": "Whether to create backups of the snippets."
}
}
},
"menus": {
"view/title": [
{
"command": "snippet.createFolder",
"when": "view == snippetsView",
"group": "navigation"
},
{
"command": "snippet.restoreBackups",
"when": "view == snippetsView",
"group": "navigation"
}
],
"view/item/context": [
{
"command": "snippet.createFolder",
"when": "view == snippetsView",
"group": "snippet.viewItemContext.baseGroup@1"
},
{
"command": "snippet.copySnippet",
"when": "view == snippetsView && viewItem == snippet",
"group": "snippet.viewItemContext.baseGroup@2"
},
{
"command": "snippet.renameSnippet",
"when": "view == snippetsView",
"group": "snippet.viewItemContext.baseGroup@3"
},
{
"command": "snippet.deleteSnippet",
"when": "view == snippetsView",
"group": "snippet.viewItemContext.baseGroup@4"
}
],
"editor/context": [
{
"when": "editorHasSelection",
"command": "snippet.findSelectedText",
"group": "1_modification"
},
{
"when": "editorHasSelection",
"command": "snippet.saveSnippet",
"group": "1_modification"
}
]
},
"views": {
"explorer": [
{
"id": "snippetsView",
"name": "Snippets"
}
]
},
"keybindings": [
{
"command": "snippet.findSelectedText",
"key": "ctrl+shift+s",
"mac": "cmd+shift+s",
"when": "editorHasSelection"
},
{
"key": "c",
"command": "snippet.showNextAnswer",
"when": "resourceScheme == 'snippet' && editorReadonly"
},
{
"key": "v",
"command": "snippet.showPreviousAnswer",
"when": "resourceScheme == 'snippet' && editorReadonly"
}
]
},
"activationEvents": [
"onCommand:snippet.find",
"onCommand:snippet.findForLanguage",
"onCommand:snippet.findSelectedText",
"onCommand:snippet.findInplace",
"onCommand:snippet.findInNewEditor",
"onCommand:snippet.showPreviousAnswer",
"onCommand:snippet.showNextAnswer",
"onCommand:snippet.toggleComments"
],
"scripts": {
"vscode:prepublish": "NODE_ENV=production npm run compile",
"compile": "rollup -c",
"precompile": "rimraf out",
"watch": "rollup -c --watch",
"prewatch": "rimraf out",
"lint": "eslint src",
"test": "npm run test-compile && export NODE_ENV=test && node ./out/test/runTest.js",
"test-compile": "tsc -p ./ --allowSyntheticDefaultImports",
"pretest-compile": "rimraf out"
},
"dependencies": {
"@vscode/vsce": "^2.31.1",
"axios": "^1.7.3",
"event-stream": "4.0.1",
"http-proxy-agent": "^7.0.2"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^26.0.1",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^11.1.6",
"@types/glob": "^8.1.0",
"@types/mocha": "^10.0.7",
"@types/node": "^14.17.0",
"@types/sinon": "^17.0.3",
"@types/vscode": "^1.74.0",
"@typescript-eslint/eslint-plugin": "^7.17.0",
"@typescript-eslint/parser": "^7.18.0",
"@vscode/test-electron": "^2.4.1",
"eslint": "^8.57.0",
"glob": "^11.0.0",
"mocha": "^10.7.0",
"rimraf": "^6.0.1",
"rollup-plugin-node-externals": "^7.1.2",
"sinon": "^18.0.0",
"rollup": "^4.20.0",
"typescript": "^5.4.5"
}
}