forked from Pure-D/code-d
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
466 lines (466 loc) · 11.9 KB
/
package.json
File metadata and controls
466 lines (466 loc) · 11.9 KB
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
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
{
"name": "code-d",
"displayName": "D Programming Language (code-d)",
"description": "auto-complete, snippets, linter and formatter for dlang",
"version": "0.16.2",
"publisher": "webfreak",
"repository": {
"type": "git",
"url": "https://github.com/Pure-D/code-d.git"
},
"icon": "images/dlogo-square.png",
"license": "MIT",
"engines": {
"vscode": "^1.13.0"
},
"categories": [
"Languages",
"Snippets",
"Linters",
"Formatters",
"Other"
],
"activationEvents": [
"onLanguage:d",
"onLanguage:dml",
"workspaceContains:dub.json",
"workspaceContains:dub.sdl",
"onCommand:code-d.switchConfiguration",
"onCommand:code-d.switchArchType",
"onCommand:code-d.switchBuildType",
"onCommand:code-d.switchCompiler",
"onCommand:code-d.killServer",
"onCommand:code-d.restartServer",
"onCommand:code-d.reloadImports",
"onCommand:code-d.run",
"onCommand:code-d.build",
"onCommand:code-d.stop",
"onCommand:code-d.debug",
"onCommand:code-d.uploadSelection",
"onCommand:code-d.insertDscanner",
"onCommand:code-d.rdmdCurrent",
"onCommand:code-d.generateCoverageReport",
"onCommand:code-d.showGCCalls",
"onCommand:dub.openSettingsEditor",
"onCommand:dub.closeSettingsEditor",
"onCommand:code-d.createProject",
"onCommand:code-d.addImport"
],
"main": "./out/src/extension",
"contributes": {
"languages": [
{
"id": "d",
"extensions": [
".d",
".di"
],
"aliases": [
"D"
],
"configuration": "./lang-configs/d.json"
},
{
"id": "dscript",
"aliases": [
"arsd.DScript"
],
"extensions": [
".dscript",
".ds"
],
"configuration": "./lang-configs/d.json"
},
{
"id": "dml",
"aliases": [
"DlangUI Markup Language"
],
"extensions": [
".dml"
],
"configuration": "./lang-configs/d.json"
},
{
"id": "sdl",
"aliases": [
"Simple Declarative Language"
],
"extensions": [
".sdl"
],
"configuration": "./lang-configs/d.json"
},
{
"id": "diet",
"aliases": [
"Diet"
],
"extensions": [
".dt"
]
}
],
"grammars": [
{
"language": "d",
"scopeName": "source.d",
"path": "./syntaxes/d.tmLanguage"
},
{
"language": "dscript",
"scopeName": "source.dscript",
"path": "./syntaxes/arsd.dscript.tmLanguage"
},
{
"language": "dml",
"scopeName": "source.dml",
"path": "./syntaxes/dml.json"
},
{
"language": "sdl",
"scopeName": "source.sdl",
"path": "./syntaxes/sdl.json"
},
{
"language": "diet",
"scopeName": "source.diet",
"path": "./syntaxes/diet.json"
}
],
"snippets": [
{
"language": "d",
"path": "./snippets/d.json"
}
],
"configuration": {
"title": "D configuration",
"type": "object",
"properties": {
"d.workspacedPath": {
"type": "string",
"default": "workspace-d",
"description": "Path of the workspace-d executable. Path can be omitted if in $PATH or installed using code-d"
},
"d.stdlibPath": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "string"
}
],
"defaultSnippets": [
{
"label": "Choose based on platform",
"body": "auto"
},
{
"label": "Linux Default",
"body": [
"/usr/include/dmd/druntime/import",
"/usr/include/dmd/phobos"
]
},
{
"label": "ArchLinux Default",
"body": [
"/usr/include/dlang/dmd"
]
},
{
"label": "Windows Default",
"body": [
"C:\\D\\dmd2\\src\\druntime\\import",
"C:\\D\\dmd2\\src\\phobos"
]
},
{
"label": "OSX Default",
"body": [
"/Library/D/dmd/src/druntime/import",
"/Library/D/dmd/src/phobos"
]
}
],
"description": "Array of paths to phobos and D runtime for automatic inclusion for auto completion"
},
"d.dcdClientPath": {
"type": "string",
"default": "dcd-client",
"description": "Path of the dcd-client executable. Path can be omitted if in $PATH or installed using code-d"
},
"d.dcdServerPath": {
"type": "string",
"default": "dcd-server",
"description": "Path of the dcd-server executable. Path can be omitted if in $PATH or installed using code-d"
},
"d.dscannerPath": {
"type": "string",
"default": "dscanner",
"description": "Path of the dscanner executable. Path can be omitted if in $PATH or installed using code-d"
},
"d.dfmtPath": {
"type": "string",
"default": "dfmt",
"description": "Path of the dfmt executable. Path can be omitted if in $PATH or installed using code-d"
},
"d.dubPath": {
"type": "string",
"default": "dub",
"description": "Path of the dub executable. Path can be omitted if in $PATH or installed using code-d"
},
"d.enableLinting": {
"type": "boolean",
"default": true,
"description": "If code-d should watch for file saves and report static analysis. Might interfere with other lint plugins or settings."
},
"d.enableSDLLinting": {
"type": "boolean",
"default": true,
"description": "If code-d should report errors in your dub.sdl file."
},
"d.enableDubLinting": {
"type": "boolean",
"default": true,
"description": "If code-d should build on save to check for compile errors."
},
"d.enableAutoComplete": {
"type": "boolean",
"default": true,
"description": "Start dcd-server at startup and complete using dcd-client."
},
"d.neverUseDub": {
"type": "boolean",
"default": false,
"description": "If this is true then a custom workspace where you manually provide the import paths will always be used instead of dub. See d.projectImportPaths for setting import paths then. This is discouraged as it will remove most features like packages, building & compiler linting. If this is a standalone project with no external dependencies with a custom build system then this should be true."
},
"d.projectImportPaths": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"description": "Setting for import paths in your workspace if not using dub. This will replace other paths. Its recommended to set this in your workspace settings instead of your user settings to keep it separate for each project."
},
"d.dubConfiguration": {
"type": "string",
"description": "Sets the default configuration to use when starting up"
},
"d.dubArchType": {
"type": "string",
"description": "Sets the default arch type to use when starting up"
},
"d.dubBuildType": {
"type": "string",
"description": "Sets the default build type to use when starting up"
},
"d.dubCompiler": {
"type": "string",
"description": "Sets the default compiler to use when starting up"
},
"d.disableWorkspaceD": {
"type": "boolean",
"default": false,
"description": "Disables most code-d features. Intended for debugging/working on new features with lots of vscode restarts"
},
"d.overrideDfmtEditorconfig": {
"type": "boolean",
"default": true,
"description": "Uses dfmt config options & vscode editor config instead of .editorconfig because dfmt seems to be quite buggy with them."
},
"dfmt.alignSwitchStatements": {
"type": "boolean",
"default": true,
"description": "Not yet implemented (on dfmt side)"
},
"dfmt.braceStyle": {
"type": "string",
"enum": [
"allman",
"otbs",
"stroustrup"
],
"default": "allman",
"description": "See Wikipedia https://en.wikipedia.org/wiki/Brace_style"
},
"dfmt.outdentAttributes": {
"type": "boolean",
"default": true,
"description": "Not yet implemented (on dfmt side)"
},
"dfmt.spaceAfterCast": {
"type": "boolean",
"default": true,
"description": "Insert space after the closing paren of a cast expression."
},
"dfmt.splitOperatorAtLineEnd": {
"type": "boolean",
"default": false,
"description": "Place operators on the end of the previous line when splitting lines."
},
"dfmt.selectiveImportSpace": {
"type": "boolean",
"default": true,
"description": "Insert space after the module name and before the : for selective imports."
},
"dfmt.compactLabeledStatements": {
"type": "boolean",
"default": true,
"description": "Place labels on the same line as the labeled switch, for, foreach, or while statement."
},
"dfmt.templateConstraintStyle": {
"type": "string",
"enum": [
"conditional_newline_indent",
"conditional_newline",
"always_newline",
"always_newline_indent"
],
"default": "conditional_newline_indent",
"description": "Control the formatting of template constraints."
}
}
},
"menus": {
"explorer/context": [
{
"when": "resourceLangId == d",
"command": "code-d.rdmdCurrent",
"group": "1_modification"
}
],
"editor/title": [
{
"when": "resourceFilename == 'dub.json'",
"command": "dub.openSettingsEditor",
"group": "navigation"
},
{
"when": "resourceScheme == dubsettings",
"command": "dub.closeSettingsEditor",
"group": "navigation"
}
]
},
"commands": [
{
"command": "code-d.switchConfiguration",
"title": "code-d: Switch Configuration"
},
{
"command": "code-d.switchArchType",
"title": "code-d: Switch Arch Type"
},
{
"command": "code-d.switchBuildType",
"title": "code-d: Switch Build Type"
},
{
"command": "code-d.switchCompiler",
"title": "code-d: Switch Compiler"
},
{
"command": "code-d.killServer",
"title": "code-d: Kill DCD Server"
},
{
"command": "code-d.restartServer",
"title": "code-d: Restart DCD Server"
},
{
"command": "code-d.reloadImports",
"title": "code-d: Reload import paths"
},
{
"command": "code-d.run",
"title": "code-d: Run project"
},
{
"command": "code-d.build",
"title": "code-d: Build project"
},
{
"command": "code-d.stop",
"title": "code-d: Stop project"
},
{
"command": "code-d.debug",
"title": "code-d: Debug project using code-debug"
},
{
"command": "code-d.uploadSelection",
"title": "code-d: Upload selection to dpaste.com"
},
{
"command": "code-d.insertDscanner",
"title": "code-d: Insert default dscanner.ini content"
},
{
"command": "code-d.rdmdCurrent",
"title": "Run document using rdmd"
},
{
"command": "code-d.generateCoverageReport",
"title": "code-d: Generate coverage report"
},
{
"command": "code-d.showGCCalls",
"title": "code-d: Show GC calls from profilegc.log"
},
{
"command": "dub.openSettingsEditor",
"title": "code-d/dub: Open project settings",
"icon": {
"light": "./images/edit-dub-inverse.svg",
"dark": "./images/edit-dub.svg"
}
},
{
"command": "dub.closeSettingsEditor",
"title": "code-d/dub: Close project settings",
"icon": {
"light": "./images/edit-source-inverse.svg",
"dark": "./images/edit-source.svg"
}
},
{
"command": "code-d.createProject",
"title": "code-d: Create new Project"
}
],
"jsonValidation": [
{
"fileMatch": "dub.json",
"url": "./json-validation/dub.schema.json"
}
]
},
"scripts": {
"vscode:prepublish": "tsc -p ./",
"compile": "tsc -watch -p ./",
"postinstall": "node ./node_modules/vscode/bin/install"
},
"dependencies": {
"request": "^2.81.0",
"request-progress": "^3.0.0",
"jsonc-parser": "^0.2.3",
"unzip": "^0.1.11",
"async": "^2.5.0",
"ncp": "^2.0.0",
"rmdir": "^1.2.0",
"line-by-line": "^0.1.5"
},
"devDependencies": {
"typescript": "^2.4.1",
"vscode": "^1.1.1",
"mocha": "^3.4.2",
"@types/node": "^8.0.7",
"@types/mocha": "^2.2.41"
}
}