-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
655 lines (655 loc) · 26 KB
/
Copy pathpackage.json
File metadata and controls
655 lines (655 loc) · 26 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
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
{
"name": "phel-lang",
"displayName": "Phel Lang",
"description": "Phel language support for VS Code: syntax highlighting, code completion, and snippets for .phel files (plus an optional Xdebug-based debug adapter).",
"version": "0.12.0",
"publisher": "Phel-Lang",
"license": "MIT",
"engines": {
"vscode": "^1.88.0"
},
"categories": [
"Programming Languages",
"Snippets",
"Debuggers"
],
"keywords": [
"phel",
"phel-lang",
".phel",
"lisp",
"clojure",
"php",
"functional",
"syntax-highlighting",
"completion",
"snippets",
"xdebug"
],
"qna": false,
"pricing": "Free",
"icon": "icon.png",
"galleryBanner": {
"color": "#1e1e1e",
"theme": "dark"
},
"badges": [
{
"url": "https://vsmarketplacebadges.dev/version-short/Phel-Lang.phel-lang.svg",
"href": "https://marketplace.visualstudio.com/items?itemName=Phel-Lang.phel-lang",
"description": "Marketplace version"
},
{
"url": "https://img.shields.io/github/v/release/phel-lang/phel-vs-code-extension?label=release",
"href": "https://github.com/phel-lang/phel-vs-code-extension/releases",
"description": "Latest GitHub release"
}
],
"repository": {
"type": "git",
"url": "https://github.com/phel-lang/phel-vs-code-extension"
},
"bugs": {
"url": "https://github.com/phel-lang/phel-vs-code-extension/issues"
},
"homepage": "https://github.com/phel-lang/phel-vs-code-extension#readme",
"main": "./dist/extension.js",
"activationEvents": [
"onLanguage:phel",
"onDebugResolve:phel"
],
"contributes": {
"languages": [
{
"id": "phel",
"aliases": [
"Phel",
"phel"
],
"extensions": [
".phel"
],
"configuration": "./language-configuration.json"
}
],
"grammars": [
{
"language": "phel",
"scopeName": "source.phel",
"path": "./syntaxes/phel.tmLanguage.json"
}
],
"snippets": [
{
"language": "phel",
"path": "./snippets/phel.code-snippets"
}
],
"breakpoints": [
{
"language": "phel"
}
],
"debuggers": [
{
"type": "phel",
"label": "Phel Debug",
"languages": [
"phel"
],
"configurationAttributes": {
"launch": {
"required": [],
"properties": {
"program": {
"type": "string",
"description": "The Phel entry point file (optional, for reference only)",
"default": "${workspaceFolder}/src/app.phel"
},
"stopOnEntry": {
"type": "boolean",
"description": "Automatically stop after launch",
"default": false
},
"phpDebugPort": {
"type": "number",
"description": "Xdebug port to listen on",
"default": 9003
},
"pathMappings": {
"type": "object",
"description": "Path mappings for remote debugging",
"default": {}
},
"cacheDir": {
"type": "string",
"description": "Phel cache directory (where compiled PHP files are stored)",
"default": ""
},
"skipPhelInternals": {
"type": "boolean",
"description": "Skip stepping through Phel runtime internals",
"default": true
},
"skipFiles": {
"type": "array",
"description": "Glob patterns for files to skip when stepping",
"items": {
"type": "string"
},
"default": []
}
}
}
},
"initialConfigurations": [
{
"type": "phel",
"request": "launch",
"name": "Debug Phel (Listen for Xdebug)",
"phpDebugPort": 9003
}
],
"configurationSnippets": [
{
"label": "Phel: Listen for Xdebug",
"description": "Listen for Xdebug connections and translate breakpoints for Phel files",
"body": {
"type": "phel",
"request": "launch",
"name": "Debug Phel",
"phpDebugPort": 9003
}
},
{
"label": "Phel: Debug with Docker",
"description": "Debug Phel in a Docker container with path mappings",
"body": {
"type": "phel",
"request": "launch",
"name": "Debug Phel (Docker)",
"phpDebugPort": 9003,
"pathMappings": {
"/var/www/html": "${workspaceFolder}"
}
}
}
]
}
],
"commands": [
{
"command": "phel.showCompiledLocation",
"title": "Phel: Show Compiled PHP Location"
},
{
"command": "phel.clearSourceMapCache",
"title": "Phel: Clear Source Map Cache"
},
{
"command": "phel.showDoc",
"title": "Phel: Show Documentation",
"category": "Phel"
},
{
"command": "phel.doctor",
"title": "Phel: Doctor (check project health)",
"category": "Phel"
},
{
"command": "phel.showConfig",
"title": "Phel: Show Effective Configuration",
"category": "Phel"
},
{
"command": "phel.runTest",
"title": "Phel: Run Test",
"category": "Phel"
},
{
"command": "phel.runTestsInFile",
"title": "Phel: Run All Tests in File",
"category": "Phel"
},
{
"command": "phel.test.watch",
"title": "Phel: Watch Tests",
"category": "Phel"
},
{
"command": "phel.build",
"title": "Phel: Build",
"category": "Phel"
},
{
"command": "phel.init",
"title": "Phel: Init Project",
"category": "Phel"
},
{
"command": "phel.paredit.slurpForward",
"title": "Phel: Slurp Forward",
"category": "Phel"
},
{
"command": "phel.paredit.barfForward",
"title": "Phel: Barf Forward",
"category": "Phel"
},
{
"command": "phel.paredit.slurpBackward",
"title": "Phel: Slurp Backward",
"category": "Phel"
},
{
"command": "phel.paredit.barfBackward",
"title": "Phel: Barf Backward",
"category": "Phel"
},
{
"command": "phel.paredit.raise",
"title": "Phel: Raise Form",
"category": "Phel"
},
{
"command": "phel.paredit.wrapRound",
"title": "Phel: Wrap with ( )",
"category": "Phel"
},
{
"command": "phel.paredit.wrapSquare",
"title": "Phel: Wrap with [ ]",
"category": "Phel"
},
{
"command": "phel.paredit.wrapCurly",
"title": "Phel: Wrap with { }",
"category": "Phel"
},
{
"command": "phel.paredit.dragForward",
"title": "Phel: Drag Form Forward",
"category": "Phel"
},
{
"command": "phel.paredit.dragBackward",
"title": "Phel: Drag Form Backward",
"category": "Phel"
},
{
"command": "phel.paredit.splice",
"title": "Phel: Splice Form",
"category": "Phel"
},
{
"command": "phel.paredit.kill",
"title": "Phel: Kill Form",
"category": "Phel"
},
{
"command": "phel.repl.start",
"title": "Phel: Start REPL",
"category": "Phel"
},
{
"command": "phel.repl.evalForm",
"title": "Phel: Eval Form Under Cursor",
"category": "Phel"
},
{
"command": "phel.repl.evalSelection",
"title": "Phel: Eval Selection",
"category": "Phel"
},
{
"command": "phel.repl.evalNextForm",
"title": "Phel: Eval Next Form",
"category": "Phel"
},
{
"command": "phel.repl.evalFile",
"title": "Phel: Eval File",
"category": "Phel"
},
{
"command": "phel.repl.switchNs",
"title": "Phel: Switch REPL to Current Namespace",
"category": "Phel"
},
{
"command": "phel.nrepl.connect",
"title": "Phel: Connect to nREPL Server",
"category": "Phel"
},
{
"command": "phel.nrepl.disconnect",
"title": "Phel: Disconnect from nREPL Server",
"category": "Phel"
},
{
"command": "phel.nrepl.eval",
"title": "Phel: nREPL Eval Form Under Cursor",
"category": "Phel"
},
{
"command": "phel.nrepl.evalInline",
"title": "Phel: nREPL Eval Form Inline",
"category": "Phel"
},
{
"command": "phel.nrepl.evalSelection",
"title": "Phel: nREPL Eval Selection",
"category": "Phel"
},
{
"command": "phel.nrepl.loadFile",
"title": "Phel: nREPL Load File",
"category": "Phel"
},
{
"command": "phel.nrepl.reload",
"title": "Phel: nREPL Reload Changed Namespaces",
"category": "Phel"
},
{
"command": "phel.nrepl.reloadAll",
"title": "Phel: nREPL Reload All Namespaces",
"category": "Phel"
},
{
"command": "phel.nrepl.runTestsInNs",
"title": "Phel: nREPL Run Tests in Namespace",
"category": "Phel"
},
{
"command": "phel.nrepl.runTestUnderCursor",
"title": "Phel: nREPL Run Test Under Cursor",
"category": "Phel"
},
{
"command": "phel.selection.expand",
"title": "Phel: Expand Selection",
"category": "Phel"
},
{
"command": "phel.selection.shrink",
"title": "Phel: Shrink Selection",
"category": "Phel"
},
{
"command": "phel.lintWorkspace",
"title": "Phel: Lint Workspace"
}
],
"keybindings": [
{
"command": "phel.paredit.slurpForward",
"key": "ctrl+shift+]",
"mac": "cmd+shift+]",
"when": "editorTextFocus && editorLangId == phel"
},
{
"command": "phel.paredit.barfForward",
"key": "ctrl+shift+[",
"mac": "cmd+shift+[",
"when": "editorTextFocus && editorLangId == phel"
},
{
"command": "phel.paredit.slurpBackward",
"key": "ctrl+shift+9",
"mac": "cmd+shift+9",
"when": "editorTextFocus && editorLangId == phel"
},
{
"command": "phel.paredit.barfBackward",
"key": "ctrl+shift+0",
"mac": "cmd+shift+0",
"when": "editorTextFocus && editorLangId == phel"
},
{
"command": "phel.paredit.raise",
"key": "ctrl+shift+r",
"mac": "cmd+shift+r",
"when": "editorTextFocus && editorLangId == phel"
},
{
"command": "phel.paredit.wrapRound",
"key": "alt+w",
"when": "editorTextFocus && editorLangId == phel"
},
{
"command": "phel.paredit.dragForward",
"key": "ctrl+shift+.",
"mac": "cmd+shift+.",
"when": "editorTextFocus && editorLangId == phel"
},
{
"command": "phel.paredit.dragBackward",
"key": "ctrl+shift+,",
"mac": "cmd+shift+,",
"when": "editorTextFocus && editorLangId == phel"
},
{
"command": "phel.paredit.splice",
"key": "alt+shift+s",
"when": "editorTextFocus && editorLangId == phel"
},
{
"command": "phel.paredit.kill",
"key": "alt+shift+k",
"when": "editorTextFocus && editorLangId == phel"
},
{
"command": "phel.repl.evalForm",
"key": "ctrl+enter",
"mac": "cmd+enter",
"when": "editorTextFocus && editorLangId == phel"
},
{
"command": "phel.nrepl.evalInline",
"key": "ctrl+alt+enter",
"mac": "cmd+alt+enter",
"when": "editorTextFocus && editorLangId == phel"
},
{
"command": "phel.repl.evalSelection",
"key": "ctrl+shift+enter",
"mac": "cmd+shift+enter",
"when": "editorTextFocus && editorLangId == phel"
},
{
"command": "phel.selection.expand",
"key": "ctrl+shift+space",
"mac": "cmd+shift+space",
"when": "editorTextFocus && editorLangId == phel"
},
{
"command": "phel.selection.shrink",
"key": "ctrl+shift+alt+space",
"mac": "cmd+shift+alt+space",
"when": "editorTextFocus && editorLangId == phel"
}
],
"configuration": {
"title": "Phel",
"properties": {
"phel.lsp.enabled": {
"type": "boolean",
"default": false,
"markdownDescription": "Opt-in (default off): use the Phel language server (`phel lsp`) for completion, hover, signature help, go-to-definition, find references, rename, symbols, formatting, and diagnostics, backed by the Phel compiler with PHP-interop awareness (`php/->`, `php/::`, `php/new`). Best-effort today: some Phel releases ship a `phel lsp` that exits on idle, in which case the extension restarts it a few times and then falls back to its bundled providers. Enable once your Phel provides a stable server. Requires a reload to take effect."
},
"phel.lsp.command": {
"type": "string",
"default": "",
"markdownDescription": "Override `#phel.executablePath#` for the language server only. Empty string falls back to `#phel.executablePath#`. Relative paths resolve against the workspace folder. Changing this restarts a running server automatically."
},
"phel.lsp.args": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"lsp"
],
"description": "Arguments passed to the Phel CLI when starting the language server. Changing this restarts a running server automatically."
},
"phel.cacheDirectory": {
"type": "string",
"default": "",
"description": "Extra directory to search for compiled Phel files. The workspace's own `.phel/cache/compiled` (Phel's default, honouring PHEL_CACHE_DIR) and the system temp directory are always searched, so this is only needed for a custom cache location."
},
"phel.debug.enabled": {
"type": "boolean",
"default": true,
"description": "Enable Phel debug adapter for source-level debugging"
},
"phel.executablePath": {
"type": "string",
"default": "vendor/bin/phel",
"examples": [
"vendor/bin/phel",
"bin/phel",
"/usr/local/bin/phel"
],
"markdownDescription": "Workspace-wide path to the Phel CLI. Used by the language server, diagnostics, format, test, and REPL unless a per-command setting (`#phel.lsp.command#`, `#phel.diagnostics.command#`, `#phel.format.command#`, `#phel.test.command#`, `#phel.repl.command#`) overrides it. Relative paths resolve against the workspace folder; absolute paths are used as-is."
},
"phel.diagnostics.enabled": {
"type": "boolean",
"default": true,
"description": "Run the diagnostics engine on open/save and surface the result as inline diagnostics."
},
"phel.diagnostics.engine": {
"type": "string",
"enum": [
"auto",
"lint",
"analyze"
],
"enumDescriptions": [
"Use `phel lint` when the CLI provides it, otherwise fall back to `phel analyze`.",
"Always use `phel lint --format=json`. Reports rule-based findings (unused bindings, arity, anything configured in `phel-lint.phel`) on top of what `analyze` reports.",
"Always use `phel analyze`. Semantic errors for the single file only."
],
"default": "auto",
"description": "Which Phel CLI subcommand backs inline diagnostics."
},
"phel.diagnostics.command": {
"type": "string",
"default": "",
"markdownDescription": "Override `#phel.executablePath#` for diagnostics only. Empty string falls back to `#phel.executablePath#`. Relative paths resolve against the workspace folder."
},
"phel.format.enabled": {
"type": "boolean",
"default": true,
"description": "Use `phel format` as the document formatter for .phel files."
},
"phel.format.command": {
"type": "string",
"default": "",
"markdownDescription": "Override `#phel.executablePath#` for formatting only. Empty string falls back to `#phel.executablePath#`. Relative paths resolve against the workspace folder."
},
"phel.tests.codeLensEnabled": {
"type": "boolean",
"default": true,
"description": "Show inline CodeLens shortcuts for running individual `deftest` forms and all tests in the current file."
},
"phel.test.command": {
"type": "string",
"default": "",
"markdownDescription": "Override `#phel.executablePath#` for the test CodeLens / Test Explorer. Empty string falls back to `#phel.executablePath#`. Relative paths resolve against the workspace folder."
},
"phel.paredit.enabled": {
"type": "boolean",
"default": true,
"description": "Register paredit-style structural editing commands (slurp / barf / raise / wrap)."
},
"phel.repl.enabled": {
"type": "boolean",
"default": true,
"description": "Register Phel REPL commands (start, eval form / selection / next form / file)."
},
"phel.repl.command": {
"type": "string",
"default": "",
"markdownDescription": "Override `#phel.executablePath#` for the REPL terminal. Empty string falls back to `#phel.executablePath#`. Relative paths resolve against the workspace folder."
},
"phel.repl.args": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"repl"
],
"description": "Arguments passed to the Phel CLI when starting the REPL."
},
"phel.repl.history.enabled": {
"type": "boolean",
"default": true,
"description": "Append every form sent to the REPL to `.vscode/phel-repl-history.phel` in the workspace."
},
"phel.nrepl.enabled": {
"type": "boolean",
"default": true,
"markdownDescription": "Register Phel nREPL commands (connect, structured eval, reload, run tests in namespace / under cursor). The extension starts `phel nrepl` on a random free port and connects over the bencode-over-TCP protocol, giving structured eval results and live-runtime test runs."
},
"phel.nrepl.reloadOnSave": {
"type": "boolean",
"default": false,
"markdownDescription": "When an nREPL connection is active, reload changed namespaces automatically every time a `.phel` file is saved. Does not start a connection on its own."
},
"phel.formHighlight.enabled": {
"type": "boolean",
"default": true,
"description": "Highlight the form enclosing the cursor with a subtle background tint."
}
}
}
},
"scripts": {
"vscode:prepublish": "npm run bundle:prod",
"bundle": "node esbuild.js",
"bundle:prod": "node esbuild.js --production",
"bundle:watch": "node esbuild.js --watch",
"compile": "tsc -p ./",
"typecheck": "tsc --noEmit -p ./",
"watch": "tsc -watch -p ./",
"lint": "eslint src --ext ts",
"lint:fix": "eslint src --ext ts --fix",
"format": "prettier --write \"src/**/*.ts\"",
"format:check": "prettier --check \"src/**/*.ts\"",
"pretest": "npm run compile && npm run lint && npm run format:check",
"test": "mocha out/test/**/*.test.js",
"check:changelog": "node scripts/check-changelog.cjs",
"tokenize": "node scripts/tokenize-sample.mjs",
"sweep": "npm run compile && node scripts/sweep-analyzers.mjs",
"regen-docs": "npm run compile && node scripts/regen-core-docs.cjs",
"package": "vsce package",
"publish": "vsce publish",
"release": "scripts/release.sh"
},
"devDependencies": {
"@types/mocha": "^10.0.6",
"@types/node": "^20.10.0",
"@types/vscode": "1.88.0",
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^7.0.0",
"@vscode/vsce": "^3.0.0",
"esbuild": "^0.28.0",
"eslint": "^8.57.0",
"mocha": "^11.7.5",
"prettier": "^3.2.0",
"typescript": "^5.3.0",
"vscode-oniguruma": "^2.0.1",
"vscode-textmate": "^9.3.2"
},
"dependencies": {
"@vscode/debugadapter": "^1.64.0",
"@vscode/debugprotocol": "^1.64.0",
"vscode-languageclient": "^8.1.0"
},
"overrides": {
"serialize-javascript": "^7.0.5",
"diff": "^9.0.0"
}
}