-
Notifications
You must be signed in to change notification settings - Fork 3
/
package.json
783 lines (783 loc) · 23.9 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
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
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
{
"name": "coc-clojure",
"version": "0.0.17",
"description": "coc.nvim wrapper for clojure-lsp",
"author": "Noah Bogart <noah.bogart@hey.com>",
"license": "MPL-2.0",
"main": "lib/index.js",
"keywords": [
"coc.nvim",
"clojure",
"clojure-lsp"
],
"repository": {
"type": "git",
"url": "https://github.com/NoahTheDuke/coc-clojure.git"
},
"engines": {
"coc": "^0.0.81"
},
"scripts": {
"lint": "eslint src --ext ts",
"lintf": "eslint package.json src --ext ts --fix",
"clean": "rimraf lib",
"watch": "NODE_ENV=development node esbuild.js --watch",
"build": "node esbuild.js",
"test": "",
"release": "npm run clean && npm run lintf -- --quiet && NODE_ENV=production node esbuild.js"
},
"dependencies": {
"extract-zip": "^2.0.1",
"follow-redirects": "^1.15.1",
"which": "^2.0.2"
},
"devDependencies": {
"@types/follow-redirects": "^1.14.4",
"@types/node": "^14.18.63",
"@types/which": "^3.0.3",
"@typescript-eslint/eslint-plugin": "^6.20.0",
"@typescript-eslint/parser": "^6.20.0",
"coc.nvim": "^0.0.83-next.9",
"esbuild": "^0.20.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"prettier": "^3.2.5",
"rimraf": "^5.0.5",
"typescript": "^5.3.3"
},
"activationEvents": [
"onLanguage:clojure"
],
"contributes": {
"configuration": {
"type": "object",
"title": "coc-clojure configuration",
"properties": {
"clojure.enable": {
"type": "boolean",
"default": true,
"description": "Enable/disable coc-clojure extension"
},
"clojure.lsp-version": {
"type": "string",
"default": "latest",
"description": "The version of clojure-lsp to install, aka '2022.05.31-17.35.50'. Can also be 'latest' or 'nightly'"
},
"clojure.lsp-check-on-start": {
"type": "boolean",
"default": true,
"description": "Check for newer versions of clojure-lsp on start"
},
"clojure.lsp-install-path": {
"type": "string",
"description": "Where to install clojure-lsp. If blank, defaults to coc's data folder"
},
"clojure.executable": {
"type": "string",
"default": "clojure-lsp",
"description": "Path to executable"
},
"clojure.executable-args": {
"type": "array",
"description": "Executable args",
"items": {
"type": "string"
}
},
"clojure.keymaps.enable": {
"type": "boolean",
"default": true,
"description": "Create normal-mode mappings for clojure-lsp commands"
},
"clojure.keymaps.shortcut": {
"type": "string",
"default": "<leader>cl",
"description": "The keyboard shortcut that will prepend the created commands"
},
"clojure.startup-message": {
"type": "boolean",
"default": false,
"description": "Enable/disable coc-clojure's message on startup"
},
"clojure.trace.server": {
"type": "string",
"default": "verbose",
"enum": [
"off",
"messages",
"verbose"
],
"description": "Trace level between vim and clojure-lsp. Trace messages can be seen by calling CocCommand workspace.showOutput."
},
"clojure.initialization-options.additional-snippets": {
"type": "array",
"description": "Additional user snippets to be available during completing.",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"detail": {
"type": "string"
},
"snippet": {
"type": "string"
}
}
}
},
"clojure.initialization-options.api": {
"type": "object",
"description": "API-specific settings",
"properties": {
"exit-on-errors?": {
"type": "boolean",
"default": true,
"description": "Whether to exit the clojure-lsp process during api/cli call if any error is found, like classpath scan failure."
}
}
},
"clojure.initialization-options.auto-add-ns-to-new-files?": {
"type": "boolean",
"default": true,
"description": "Whether to automatically add the ns form in new blank files."
},
"clojure.initialization-options.cache-path": {
"type": "string",
"default": ".lsp/.cache",
"description": "Where to store the project's analysis cache, used to speed up next clojure-lsp startup. A path relative to project root or an absolute path."
},
"clojure.initialization-options.classpath-config-paths": {
"type": "array",
"description": "List of extra configurations to load from classpath.",
"items": {
"type": "string"
},
"default": []
},
"clojure.initialization-options.cljfmt-config-path": {
"type": "object",
"default": ".cljfmt.edn",
"description": "Where to find cljfmt configuration for formatting. A path relative to project root or an absolute path. Use #re for regex inside the cljfmt configuration file."
},
"clojure.initialization-options.cljfmt": {
"type": "object",
"description": "Used for formatting, json encoded configuration for cljfmt.",
"default": {}
},
"clojure.initialization-options.code-lens": {
"type": "object",
"description": "Segregate main references from test references with option to disable.",
"properties": {
"segregate-test-references": {
"type": "boolean",
"default": true
}
}
},
"clojure.initialization-options.completion": {
"type": "object",
"description": "A warning to show when the completion will perform additional edits, such as requiring a new alias.",
"properties": {
"additional-edits-warning-text": {
"type": "string",
"default": null
}
}
},
"clojure.initialization-options.copy-kondo-configs?": {
"type": "boolean",
"description": "Whether to copy clj-kondo hooks configs exported by libs on classpath during startup lint.",
"default": true
},
"clojure.initialization-options.dependency-scheme": {
"enum": [
"zipfile",
"jar"
],
"default": "zipfile",
"description": "How the dependencies should be linked, jar will make urls compatible with java's JarURLConnection."
},
"clojure.initialization-options.document-formatting?": {
"type": "boolean",
"description": "if true or not present, document formatting is provided.",
"default": true
},
"clojure.initialization-options.document-range-formatting?": {
"type": "boolean",
"description": "if true or not present, document range formatting is provided.",
"default": true
},
"clojure.initialization-options.hover": {
"type": "object",
"description": "Options related to hovering",
"properties": {
"arity-on-same-line?": {
"type": "boolean",
"description": "Whether to keep the arity on the same line of the function on hover, useful for Emacs users.",
"default": false
},
"clojuredocs": {
"type": "boolean",
"description": "Whether to get clojuredocs information on hover, the clojuredocs content is cached.",
"default": true
},
"hide-file-location?": {
"type": "boolean",
"description": "Whether to show the full filename and path on hover.",
"default": false
}
}
},
"clojure.initialization-options.java": {
"type": "object",
"description": "Options related to java/jdk",
"properties": {
"download-jdk-source?": {
"type": "boolean",
"description": "Whether to download JDK source from :java :jdk-source-download-uri and cache after startup for JDK classes java support.",
"default": false
},
"home-path": {
"type": "string",
"description": "Whether to use this path to find JDK source and cache after startup for JDK classes java support.",
"default": null
},
"jdk-source-uri": {
"type": "string",
"default": "https://raw.githubusercontent.com/clojure-lsp/jdk-source/main/openjdk-19/reduced/source.zip",
"description": "URI containing the JDK source to be used."
},
"decompile-jar-as-project?": {
"type": "boolean",
"description": "Whether to decompile the whole jar as a java project when finding the definition of a java class.",
"default": true
}
}
},
"clojure.initialization-options.keep-parens-when-threading?": {
"type": "boolean",
"description": "Whether to keep parenthesis when threading single arity functions.",
"default": false
},
"clojure.initialization-options.lint-project-files-after-startup?": {
"type": "boolean",
"description": "Whether to async lint all project only files after startup to make features like List project errors work.",
"default": true
},
"clojure.initialization-options.linters": {
"type": "object",
"description": "clojure-lsp custom linters",
"properties": {
"clj-kondo": {
"type": "object",
"description": "clj-kondo specific settings",
"properties": {
"level": {
"description": "Enable or disable clj-kondo linting",
"enum": [
"off",
"on"
],
"default": "on"
},
"report-duplicates": {
"type": "boolean",
"description": "Shows all linters of the same symbol instead of showing only the first spot.",
"default": true
},
"ns-exclude-regex": {
"type": "string",
"default": "",
"description": "Exclude the diagnostics/findings for namespaces that match this regex."
}
}
},
"clean": {
"type": "object",
"description": "Settings related to cleaning files",
"properties": {
"automatically-after-ns-refactor": {
"type": "boolean",
"description": "Call clean-ns on the namespace after applying any refactor to it?",
"default": true
},
"ns-inner-blocks-indentation": {
"type": "string",
"description": "How to indent ns children forms like require and import.",
"enum": [
"next-line",
"same-line",
"keep"
],
"default": "keep"
},
"ns-import-classes-indentation": {
"type": "string",
"description": "How to indent classes inside package imports from :import form.",
"enum": [
"next-line",
"same-line"
],
"default": "next-line"
},
"sort": {
"type": "object",
"description": "Call clean-ns on the namespace after applying any refactor to it?",
"properties": {
"ns": {
"type": "boolean",
"description": "",
"default": true
},
"require": {
"type": "boolean",
"description": "",
"default": true
},
"import": {
"type": "boolean",
"description": "",
"default": true
},
"import-classes": {
"type": "object",
"description": "",
"properties": {
"classes-per-line": {
"type": "integer",
"description": "-1 for all lines",
"default": 3
}
}
},
"refer": {
"type": "object",
"description": "",
"properties": {
"max-line-length": {
"type": "integer",
"default": 80
}
}
}
}
}
}
}
}
},
"clojure.initialization-options.log-path": {
"type": "string",
"description": "A absolute path to a file where clojure-lsp should log."
},
"clojure.initialization-options.notify-references-on-file-change": {
"type": "boolean",
"description": "Whether to update diagnostics of the changed references when editing files, avoiding outdated diagnostics in other files.",
"default": true
},
"clojure.initialization-options.project-specs": {
"type": "array",
"description": "For defining how clojure-lsp should find your project classpath. The project-path should be a file and the classpath-cmd the command to run to get the classpath.",
"items": {
"type": "object",
"description": "Project spec",
"properties": {
"project-path": {
"type": "string",
"description": "The file root file (project.clj, deps.edn, etc)."
},
"classpath-cmd": {
"type": "array",
"description": "The command to run to generate the project's classpath",
"items": {
"type": "string"
}
},
"required": [
"project-path",
"classpath-cmd"
]
}
}
},
"clojure.initialization-options.semantic-tokens?": {
"type": "boolean",
"description": "Whether to enable LSP semantic tokens server support for syntax highlighting.",
"default": true
},
"clojure.initialization-options.source-aliases": {
"type": "array",
"description": "Used for deps.edn projects, the aliases which clojure-lsp should get the source-paths besides the root level :paths and :extra-paths.",
"items": {
"type": "string"
},
"default": [
"dev",
"test"
]
},
"clojure.initialization-options.source-paths": {
"type": "array",
"description": "Project-local directories to look for clj/cljc/cljs files. If using deps.edn, use :source-aliases instead.",
"items": {
"type": "string"
},
"default": [
"src",
"test"
]
},
"clojure.initialization-options.source-paths-ignore-regex": {
"type": "array",
"description": "list of regex to filter source-paths. By default, source-paths are retrieved from classpath, and usually the classpath contains folders that are not directly project code or it's auto-generated like cljs resources or target folders but it's inside your project.",
"items": {
"type": "string"
},
"default": [
"resources.*",
"target.*"
]
},
"clojure.initialization-options.stubs": {
"type": "object",
"description": "Stub generation related settings.",
"properties": {
"generation": {
"type": "object",
"description": "Auto stubs generation",
"properties": {
"namespaces": {
"type": "array",
"description": "The namespaces to generate and analyze stubs, empty by default disabling stub generation.",
"items": {
"type": "string"
}
},
"output-dir": {
"type": "string",
"description": "The output where to generate the stubs, by default .lsp/.cache/stubs"
},
"java-command": {
"type": "string",
"description": "the path to java command to spawn the stub process, default use java from $PATH."
}
}
},
"extra-dirs": {
"type": "array",
"description": "dirs to analyze to consider as part of manual generated stubs.",
"items": {
"type": "string"
}
}
},
"default": {
"generation": {
"namespaces": [],
"output-dir": ".lsp/.cache/stubs",
"java-command": "java"
},
"extra-dirs": []
}
},
"clojure.initialization-options.text-document-sync-kind": {
"enum": [
":incremental",
":full"
],
"default": ":full",
"description": "The sync kind during document changes, if client should send whole buffer or just related changes."
},
"clojure.initialization-options.use-metadata-for-privacy?": {
"type": "boolean",
"description": "Whether to use ^:private metadata for refactorings instead of defn-",
"default": false
},
"clojure.initialization-options.clean": {
"type": "object",
"description": "Settings related to clean-ns refactoring.",
"properties": {
"ns-inner-blocks-indentation": {
"type": "string",
"description": "Where to place first require/import.",
"enum": [
"same-line",
"next-line",
"keep"
]
},
"sort": {
"type": "object",
"description": "How to sort various forms.",
"properties": {
"ns": {
"type": "boolean",
"description": "Whether to enable sort of ns children like require/import forms"
},
"require": {
"description": "Whether to enable sort of :require form. true to sort according to the Clojure Style Guide, :lexicographically to do a lexicographic sort that places unwrapped namespaces last.",
"enum": [
true,
false,
"lexicographically"
]
},
"import": {
"type": "boolean",
"description": "Whether to enable sort of :import form."
},
"refer": {
"type": "object",
"description": "Whether to enable sort of :refer form.",
"properties": {
"max-line-length": {
"type": "number",
"description": "the max refers to keep at same line before breaking the line."
}
}
}
}
}
}
},
"clojure.executableArgs": {
"type": "array",
"deprecationMessage": "Please use 'clojure.executable-args'"
},
"clojure.initialization-options.ignore-classpath-directories": {
"type": "boolean",
"deprecationMessage": "Please use 'clojure.initialization-options.source-paths-ignore-regex'"
},
"clojure.initialization-options.show-docs-arity-on-same-line?": {
"type": "boolean",
"deprecationMessage": "Use 'clojure.initialization-options.hover.arity-on-same-line?'"
},
"clojure.initialization-options.lens-segregate-test-references": {
"type": "boolean",
"deprecationMessage": "Use 'clojure.initialization-options.code-lens.segregate-test-references'"
}
}
},
"commands": [
{
"command": "lsp-clojure-add-missing-import",
"title": "Add Java import for symbol under cursor to current namespace declaration"
},
{
"command": "lsp-clojure-add-missing-libspec",
"title": "Add require form for symbol under cursor to current namespace declaration"
},
{
"command": "lsp-clojure-add-require-suggestion",
"title": "Add suggested require to ns form"
},
{
"command": "lsp-clojure-backward-barf",
"title": "Paredit: backward barf"
},
{
"command": "lsp-clojure-backward-slurp",
"title": "Paredit: backward slurp"
},
{
"command": "lsp-clojure-change-coll",
"title": "Choose new type of collection"
},
{
"command": "lsp-clojure-change-collection",
"title": "Choose new type of collection"
},
{
"command": "lsp-clojure-clean-ns",
"title": "Sort and remove unused required libraries in namespace declaration"
},
{
"command": "lsp-clojure-create-function",
"title": "Create a function from the current form"
},
{
"command": "lsp-clojure-create-test",
"title": "Creates a test somewhere, who knows"
},
{
"command": "lsp-clojure-cursor-info",
"title": "Show debugging information for the symbol at cursor"
},
{
"command": "lsp-clojure-cycle-coll",
"title": "Cycle the kind of collection: list -> map -> vector -> set -> list"
},
{
"command": "lsp-clojure-cycle-privacy",
"title": "Cycle the privacy of current function definition"
},
{
"command": "lsp-clojure-demote-fn",
"title": "Demote fn to #()"
},
{
"command": "lsp-clojure-destructure-keys",
"title": "Destructure keys"
},
{
"command": "lsp-clojure-docs",
"title": "Read the docs for a given symbol (in given namespace)"
},
{
"command": "lsp-clojure-drag-backward",
"title": "Move coll entry backward in collection"
},
{
"command": "lsp-clojure-drag-forward",
"title": "Move coll entry forward in collection"
},
{
"command": "lsp-clojure-drag-param-backward",
"title": "Move param backwards in function definition (and all call sites)"
},
{
"command": "lsp-clojure-drag-param-forward",
"title": "Move param forward in function definition (and all call sites)"
},
{
"command": "lsp-clojure-expand-let",
"title": "Move current let form up a level"
},
{
"command": "lsp-clojure-extract-function",
"title": "Move current form into new top-level function"
},
{
"command": "lsp-clojure-extract-to-def",
"title": "Move current form into new top-level def"
},
{
"command": "lsp-clojure-forward-barf",
"title": "Paredit: forward barf"
},
{
"command": "lsp-clojure-forward-slurp",
"title": "Paredit: forward slurp"
},
{
"command": "lsp-clojure-get-in-all",
"title": "Replace current and all nested forms with get-in form"
},
{
"command": "lsp-clojure-get-in-less",
"title": "Replace first form in current get-in form with nested form"
},
{
"command": "lsp-clojure-get-in-more",
"title": "Move current form to current get-in form"
},
{
"command": "lsp-clojure-get-in-none",
"title": "Replace entire current get-in form with nested form"
},
{
"command": "lsp-clojure-inline-symbol",
"title": "Replace all instances of symbol with symbol definition"
},
{
"command": "lsp-clojure-introduce-let",
"title": "Move current form to let-bound variable"
},
{
"command": "lsp-clojure-kill-sexp",
"title": "Paredit: Kill sexp"
},
{
"command": "lsp-clojure-move-coll-entry-down",
"title": "Move coll entry forward in collection"
},
{
"command": "lsp-clojure-move-coll-entry-up",
"title": "Move coll entry backward in collection"
},
{
"command": "lsp-clojure-move-form",
"title": "Move form under cursor to specified file"
},
{
"command": "lsp-clojure-move-to-let",
"title": "Move current form into surrounding let block"
},
{
"command": "lsp-clojure-project-tree",
"title": "Show project source-paths and external dependencies"
},
{
"command": "lsp-clojure-promote-fn",
"title": "Promote #() to fn, or fn to defn"
},
{
"command": "lsp-clojure-raise-sexp",
"title": "Paredit: Raise sexp"
},
{
"command": "lsp-clojure-replace-refer-all-with-alias",
"title": "Replace ':refer :all' with alias"
},
{
"command": "lsp-clojure-replace-refer-all-with-refer",
"title": "Replace ':refer :all' with ':refer [...]'"
},
{
"command": "lsp-clojure-resolve-macro-as",
"title": "Add entry to .clj-kondo/config.edn to resolve macro as another macro"
},
{
"command": "lsp-clojure-restructure-keys",
"title": "Inline destructured keys with nested calls"
},
{
"command": "lsp-clojure-server-info",
"title": "Show server configuration information"
},
{
"command": "lsp-clojure-sort-clauses",
"title": "Sort entries within current clauses/list/map/set/vector"
},
{
"command": "lsp-clojure-sort-map",
"title": "Sort entries within current clauses/list/map/set/vector"
},
{
"command": "lsp-clojure-suppress-diagnostic",
"title": "Add a :clj-kondo/ignore to suppress linting current line"
},
{
"command": "lsp-clojure-test-tree",
"title": "Show tests as tree of data for potential UI"
},
{
"command": "lsp-clojure-thread-first",
"title": "Replace current form with thread-first expession"
},
{
"command": "lsp-clojure-thread-first-all",
"title": "Replace current and all nested forms with thread-first form"
},
{
"command": "lsp-clojure-thread-last",
"title": "Replace current form with thread-last expession"
},
{
"command": "lsp-clojure-thread-last-all",
"title": "Replace current and all nested forms with thread-last form"
},
{
"command": "lsp-clojure-unwind-all",
"title": "Replace entire current threaded form with nested form"
},
{
"command": "lsp-clojure-unwind-thread",
"title": "Replace first two forms in current threaded form with nested form"
}
]
}
}