forked from Hazelight/vscode-unreal-angelscript
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpackage.json
470 lines (470 loc) · 20.8 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
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
467
468
469
470
{
"name": "openplanet-angelscript",
"displayName": "Openplanet Angelscript",
"description": "Language Server for use with Openplanet Angelscript",
"version": "0.2.32",
"homepage": "https://github.com/xertrov/vscode-openplanet-angelscript",
"publisher": "XertroV",
"engines": {
"vscode": "^1.65.0"
},
"categories": [
"Programming Languages"
],
"activationEvents": [
"onLanguage:angelscript"
],
"repository": {
"type": "git",
"url": "https://github.com/XertroV/vscode-openplanet-angelscript"
},
"main": "./extension/out/extension",
"icon": "resources/openplanet-bigger.png",
"galleryBanner": {
"color": "#1f2d3b",
"theme": "dark"
},
"contributes": {
"configuration": {
"title": "Openplanet Angelscript",
"properties": {
"OpenplanetAngelscript.openplanetNextLocation": {
"type": "string",
"order": 0,
"default": "",
"markdownDescription": "Location of OpenplanetNext folder (Reload required on change).\n\nTypically `%userprofile%\\OpenplanetNext\\`. \n\nOn WSL: `$HOME/OpenplanetNext/`"
},
"OpenplanetAngelscript.openplanetNextPluginsLocation": {
"type": "string",
"order": 1,
"default": "",
"markdownDescription": "Location of `Trackmania\\Openplanet\\Plugins` folder (Reload required on change).\n\nTypically `C:\\Program Files (x86)\\Ubisoft\\Ubisoft Game Launcher\\games\\Trackmania\\Openplanet\\Plugins\\`.\n\nOn WSL: `/mnt/c/Program Files (x86)/Ubisoft/Ubisoft Game Launcher/games/Trackmania/Openplanet/Plugins/`"
},
"OpenplanetAngelscript.parser.squiggleUnparsableStatements": {
"type": "boolean",
"order": 10,
"default": true,
"description": "Whether to show a red squiggle under unparsable statements"
},
"OpenplanetAngelscript.parser.enableDebugOutput": {
"type": "boolean",
"order": 11,
"default": false,
"description": "Whether to print debug output for parsing errors under Output > Angelscript Language Server"
},
"OpenplanetAngelscript.parser.crashOnParseError": {
"type": "boolean",
"order": 12,
"default": false,
"dependencies": {
"enableDebugOutput": {
"oneOf": [
true
]
}
},
"description": "Whether to crash on a parsing error (a reload will be required)"
},
"OpenplanetAngelscript.helper.insertParenthesisOnFunctionCompletion": {
"type": "boolean",
"default": false,
"description": "Insert parenthesis pair when auto-completing a function call. (note: bugged when using '(' to complete a suggestion)"
},
"OpenplanetAngelscript.helper.markUnreadVariablesAsUnused": {
"type": "boolean",
"default": false,
"description": "Variables that are written to but never read are marked as unused as well."
},
"OpenplanetAngelscript.helper.mathCompletionShortcuts": {
"type": "boolean",
"default": true,
"description": "Add completions for functions in the Math:: namespace so they can be completed without typing Math:: first."
},
"OpenplanetAngelscript.helper.uiCompletionShortcuts": {
"type": "boolean",
"default": true,
"description": "Add completions for functions in the UI:: namespace so they can be completed without typing UI:: first."
},
"OpenplanetAngelscript.helper.mathXCompletionShortcuts": {
"type": "boolean",
"default": true,
"description": "Add completions for functions in the MathX:: namespace so they can be completed without typing MathX:: first."
},
"OpenplanetAngelscript.helper.uxCompletionShortcuts": {
"type": "boolean",
"default": true,
"description": "Add completions for functions in the UX:: namespace so they can be completed without typing UX:: first."
},
"OpenplanetAngelscript.helper.matCompletionShortcuts": {
"type": "boolean",
"default": true,
"description": "Add completions for functions in the mat4:: namespace so they can be completed without typing mat4:: first."
},
"OpenplanetAngelscript.helper.quatCompletionShortcuts": {
"type": "boolean",
"default": true,
"description": "Add completions for functions in the quat:: namespace so they can be completed without typing quat:: first."
},
"OpenplanetAngelscript.helper.stringCompletionShortcuts": {
"type": "boolean",
"default": true,
"description": "Add completions for functions in the string:: namespace so they can be completed without typing string:: first."
},
"OpenplanetAngelscript.helper.correctFloatLiteralsWhenExpectingDoublePrecision": {
"type": "boolean",
"default": false,
"markdownDescription": "When a float literal is typed (eg `1.f`) in a context where double-precision is expected, automatically correct it (eg to `1.0`)"
},
"OpenplanetAngelscript.inlayHints.inlayHintsEnabled": {
"type": "boolean",
"default": true,
"description": "Enable inlay hints rendered by the angelscript extension."
},
"OpenplanetAngelscript.inlayHints.parameterHintsForConstants": {
"type": "boolean",
"default": true,
"description": "Show parameter name hints when passing a constant literal argument."
},
"OpenplanetAngelscript.inlayHints.parameterHintsForComplexExpressions": {
"type": "boolean",
"default": true,
"description": "Show parameter name hints when passing a complex expression as an argument."
},
"OpenplanetAngelscript.inlayHints.parameterReferenceHints": {
"type": "boolean",
"default": true,
"description": "Show an inlay hint when a parameter takes a writeable reference."
},
"OpenplanetAngelscript.inlayHints.parameterHintsForSingleParameterFunctions": {
"type": "boolean",
"default": false,
"description": "Enable parameter name hints for functions that are only passed a single argument."
},
"OpenplanetAngelscript.inlayHints.typeHintsForAutos": {
"type": "boolean",
"default": true,
"description": "Show the name of the type as an inlay hint on auto declarations."
},
"OpenplanetAngelscript.inlayHints.parameterHintsIgnoredParameterNames": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"Object",
"FunctionName",
"Value",
"InValue",
"NewValue",
"Condition",
"Parameters",
"Params"
],
"description": "Parameters with a name included in this list will be ignored for inlay hints."
},
"OpenplanetAngelscript.inlayHints.parameterHintsIgnoredFunctionNames": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"description": "Functions with a name included in this list will be ignored for inlay hints"
},
"OpenplanetAngelscript.inlineValues.showInlineValueForLocalVariables": {
"type": "boolean",
"default": true,
"description": "When debugging, show an inline value next to local variable declarations."
},
"OpenplanetAngelscript.inlineValues.showInlineValueForParameters": {
"type": "boolean",
"default": true,
"description": "When debugging, show an inline value for function parameters."
},
"OpenplanetAngelscript.inlineValues.showInlineValueForMemberAssignment": {
"type": "boolean",
"default": true,
"description": "When debugging, show an inline value next to direct assignments of this member variables."
},
"OpenplanetAngelscript.inlineValues.showInlineValueForFunctionThisObject": {
"type": "boolean",
"default": true,
"description": "When debugging, show an inline value above the function declaration to display the this pointer and Owner of the object."
}
}
},
"languages": [
{
"id": "angelscript",
"aliases": [
"Angelscript",
"angelscript"
],
"extensions": [
".as"
],
"configuration": "./extension/language-configuration.json",
"icon": {
"dark": "resources/openplanet-bigger-white.png",
"light": "resources/openplanet-bigger.png"
}
},
{
"id": "angelscript_snippet",
"aliases": [
"Angelscript Snippet"
],
"extensions": [],
"configuration": "./extension/language-configuration.json"
}
],
"grammars": [
{
"language": "angelscript",
"scopeName": "source.angelscript",
"path": "./extension/syntaxes/angelscript.tmLanguage.json"
},
{
"language": "angelscript_snippet",
"scopeName": "source.angelscript_snippet",
"path": "./extension/syntaxes/angelscript_snippet.tmLanguage.json"
}
],
"configurationDefaults": {
"[angelscript]": {
"editor.tabSize": 4
}
},
"breakpoints": [
{
"language": "angelscript"
}
],
"debuggers_disabled": [
{
"type": "angelscript",
"label": "Angelscript Debug",
"program": "./extension/out/debugAdapter.js",
"runtime": "node",
"languages": [
"angelscript"
],
"configurationAttributes": {
"launch": {
"required": [],
"properties": {
"trace": {
"type": "boolean",
"description": "Enable logging of the Debug Adapter Protocol.",
"default": true
},
"port": {
"type": "number",
"description": "Port to AS debug server",
"default:": 27099
}
}
}
},
"initialConfigurations": [
{
"type": "angelscript",
"request": "launch",
"name": "Debug Angelscript"
}
],
"configurationSnippets": [
{
"label": "Start Angelscript Debugging",
"description": "Debug angelscript code.",
"body": {
"type": "angelscript",
"request": "launch",
"name": "Debug Angelscript"
}
}
]
}
],
"commands": [
{
"command": "angelscript.copyImportPath",
"title": "Copy Import Path"
},
{
"command": "angelscript.goToSymbol",
"title": "Go to Symbol"
},
{
"command": "angelscript.addImportTo",
"title": "Add Import To"
},
{
"command": "angelscript.quickOpenImport",
"title": "Quick Open Import"
},
{
"command": "angelscript.paren",
"title": "Angelscript Parenthesis Completion"
},
{
"command": "angelscript.reloadInfoToml",
"title": "Angelscript: Reload info.toml & dependencies"
}
],
"menus": {
"explorer/context": [
{
"when": "resourceLangId == angelscript",
"command": "angelscript.copyImportPath",
"group": "5_cutcopypaste"
}
],
"editor/context": [
{
"when": "resourceLangId == angelscript",
"command": "angelscript.goToSymbol",
"group": "navigation"
},
{
"when": "resourceLangId == angelscript",
"command": "angelscript.addImportTo",
"group": "navigation"
},
{
"when": "resourceLangId == angelscript",
"command": "angelscript.quickOpenImport",
"group": "navigation"
}
]
},
"keybindings": [
{
"command": "angelscript.goToSymbol",
"key": "alt+g",
"when": "editorTextFocus"
},
{
"command": "angelscript.addImportTo",
"key": "alt+shift+i",
"when": "editorTextFocus"
},
{
"command": "angelscript.quickOpenImport",
"key": "alt+e",
"when": "editorTextFocus"
}
],
"semanticTokenScopes": [
{
"language": "angelscript",
"scopes": {
"as_typename": [
"support.type.angelscript"
],
"as_typename_component": [
"support.type.component.angelscript"
],
"as_typename_actor": [
"support.type.actor.angelscript"
],
"as_typename_delegate": [
"support.type.delegate.angelscript"
],
"as_typename_event": [
"support.type.event.angelscript"
],
"as_typename_struct": [
"support.type.struct.angelscript"
],
"as_typename_primitive": [
"storage.type.primitive.angelscript"
],
"as_namespace": [
"entity.name.namespace.angelscript"
],
"as_template_base_type": [
"support.type.angelscript"
],
"as_parameter": [
"variable.parameter.angelscript"
],
"as_local_variable": [
"variable.other.local.angelscript"
],
"as_member_variable": [
"variable.other.property.angelscript"
],
"as_member_accessor": [
"variable.other.property.accessor.angelscript"
],
"as_global_variable": [
"variable.other.global.angelscript"
],
"as_global_accessor": [
"variable.other.global.accessor.angelscript"
],
"as_member_function": [
"entity.name.function.member.angelscript"
],
"as_global_function": [
"entity.name.function.angelscript"
],
"as_unknown_error": [
"invalid"
],
"as_unimported_symbol": [
"invalid.unimported.angelscript"
],
"as_access_specifier": [
"support.type.access_specifier.angelscript"
]
}
}
]
},
"dependencies": {
"@types/adm-zip": "^0.5.0",
"@types/glob": "^7.1.3",
"@types/nearley": "^2.0.0",
"adm-zip": "^0.5.9",
"copy-paste": "^1.1.3",
"glob": "^7.1.3",
"iconv-lite": "^0.6.2",
"moo": "^0.5.1",
"nearley": "^2.20.1",
"toml": "^3.0.0",
"vscode-languageclient": "^8.0.1",
"vscode-languageserver": "^8.0.1",
"vscode-languageserver-textdocument": "^1.0.1"
},
"scripts": {
"build:all": "npm run grammar:compile && npm run compile && echo 'Done build:all'",
"vscode:prepublish:esbuild": "npm run build:all && npm run esbuild-ext -- --minify && npm run esbuild-lsp -- --minify",
"vscode:prepublish:tsc": "npm run build:all",
"vscode:prepublish": "npm run vscode:prepublish:tsc",
"esbuild-ext": "esbuild ./extension/src/extension.ts --bundle --outfile=out/extension.js --external:vscode --external:copy-paste --format=cjs --platform=node",
"esbuild-lsp": "esbuild ./language-server/src/server.ts --bundle --outfile=out/server.js --external:vscode --format=cjs --platform=node",
"esbuild": "npm run esbuild-base -- --sourcemap",
"esbuild-watch": "npm run esbuild-base -- --sourcemap --watch",
"compile": "tsc -b",
"watch": "tsc -b -w",
"postinstall": "cd extension && npm ci && cd ../language-server && npm ci && cd ..",
"grammar:compile": "cd language-server/grammar && nearleyc angelscript.ne -o angelscript.js && nearleyc grammar_statement.ne -o grammar_statement.js && nearleyc grammar_class_statement.ne -o grammar_class_statement.js && nearleyc grammar_global_statement.ne -o grammar_global_statement.js && nearleyc grammar_enum_statement.ne -o grammar_enum_statement.js && nearleyc grammar_array_statement.ne -o grammar_array_statement.js && nearleyc grammar_inline_function.ne -o grammar_inline_function.js",
"grammar:test": "nearley-test language-server/grammar/grammar_global_statement.js -q <test.as",
"grammar:test_verbose": "nearley-test language-server/grammar/grammar_global_statement.js <test.as",
"grammar:test_inline_func": "nearley-test language-server/grammar/grammar_inline_function.js < testGrammar/inlineFunction.as",
"grammar:test_inline_func_arg": "nearley-test language-server/grammar/grammar_global_statement.js < testGrammar/expr-inlineFunction-asArg-01.as",
"debug-parse": "node language-server/out/debug_parse.js ."
},
"devDependencies": {
"@types/mocha": "^8.2.2",
"@types/node": "^12.20.55",
"@typescript-eslint/eslint-plugin": "^4.21.0",
"@typescript-eslint/parser": "^4.21.0",
"esbuild": "^0.15.10",
"eslint": "^7.23.0",
"mocha": "^10.0.0",
"npm": "^8.19.2",
"typescript": "^4.9.5"
}
}