-
-
Notifications
You must be signed in to change notification settings - Fork 40
/
package.json
1617 lines (1617 loc) · 67.5 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
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"name": "coc-rust-analyzer",
"version": "0.77.6",
"description": "rust-analyzer for Vim/Neovim, works as an extension with coc.nvim",
"author": "Heyward Fann <[email protected]>",
"license": "MIT",
"main": "lib/index.js",
"keywords": [
"coc.nvim"
],
"repository": {
"type": "git",
"url": "git+https://github.com/fannheyward/coc-rust-analyzer.git"
},
"engines": {
"coc": "^0.0.80"
},
"activationEvents": [
"onLanguage:rust"
],
"scripts": {
"check": "biome check src",
"schema": "node ./generate-config-schema.js",
"build": "node esbuild.mjs",
"watch": "node esbuild.mjs --watch",
"prepare": "node esbuild.mjs"
},
"devDependencies": {
"@biomejs/biome": "^1.8.3",
"@types/node": "16",
"@types/node-fetch": "2.6.11",
"@types/which": "^3.0.4",
"coc.nvim": "^0.0.83-next.18",
"esbuild": "^0.24.0",
"https-proxy-agent": "^7.0.5",
"node-fetch": "2.6.7",
"typescript": "^5.5.3",
"vscode-languageserver-protocol": "^3.17.5",
"which": "^4.0.0"
},
"prettier": {
"singleQuote": true,
"printWidth": 180,
"semi": true
},
"contributes": {
"rootPatterns": [
{
"filetype": "rust",
"patterns": [
"Cargo.toml",
"rust-project.json"
]
}
],
"jsonValidation": [
{
"fileMatch": "rust-project.json",
"url": "https://json.schemastore.org/rust-project.json"
},
{
"fileMatch": ".rust-project.json",
"url": "https://json.schemastore.org/rust-project.json"
}
],
"configuration": {
"type": "object",
"title": "coc-rust-analyzer configuration",
"properties": {
"rust-analyzer.enable": {
"type": "boolean",
"markdownDescription": "Enable `coc-rust-analyzer`",
"default": true
},
"rust-analyzer.disableProgressNotifications": {
"type": "boolean",
"default": false,
"markdownDescription": "Disable initialization and workdone progress notifications"
},
"rust-analyzer.terminal.startinsert": {
"type": "boolean",
"default": false,
"markdownDescription": "Enter insert mode after terminal displayed"
},
"rust-analyzer.debug.runtime": {
"type": "string",
"default": "termdebug",
"enum": [
"termdebug",
"vimspector",
"nvim-dap"
],
"markdownDescription": "Choose which debug runtime to use",
"enumDescriptions": [
"`\"termdebug\"` use vim/neovim builtin debugger - gdb",
"`\"vimspector\"` use vimspector plugin",
"`\"nvim-dap\"` use nvim-dap plugin"
]
},
"rust-analyzer.debug.vimspector.configuration.name": {
"type": "string",
"default": "launch",
"markdownDescription": "Specify the name of the vimspector configuration name. The following args will be passed to the configuration: `Executable` and `Args` (both strings)"
},
"rust-analyzer.debug.nvimdap.configuration.template": {
"type": "string",
"default": "",
"markdownDescription": "Configuration template used to invoked dap.run([conf](https://github.com/mfussenegger/nvim-dap/blob/0e6b7c47dd70e80793ed39271b2aa712d9366dbc/doc/dap.txt#L656C2-L656C2)). The template will be instantiate like thie: `$exe` will be replaced with executable path, `$args` will be replaced with arguments."
},
"rust-analyzer.server.path": {
"type": [
"null",
"string"
],
"default": null,
"markdownDescription": "Path to rust-analyzer executable (points to bundled binary by default). If this is set, then \"rust-analyzer.updates.channel\" setting is not used"
},
"rust-analyzer.server.extraEnv": {
"type": [
"null",
"object"
],
"default": null,
"markdownDescription": "Extra environment variables that will be passed to the rust-analyzer executable. Useful for passing e.g. `RA_LOG` for debugging."
},
"rust-analyzer.restartServerOnConfigChange": {
"markdownDescription": "Whether to restart the server automatically when certain settings that require a restart are changed.",
"default": false,
"type": "boolean"
},
"rust-analyzer.trace.server": {
"type": "string",
"scope": "window",
"enum": [
"off",
"messages",
"verbose"
],
"enumDescriptions": [
"No traces",
"Error only",
"Full log"
],
"default": "off",
"markdownDescription": "Trace requests to the rust-analyzer"
},
"rust-analyzer.updates.prompt": {
"type": [
"boolean",
"string"
],
"enum": [
true,
false,
"neverDownload"
],
"default": true,
"markdownDescription": "Prompt the user before downloading rust-analyzer"
},
"rust-analyzer.updates.checkOnStartup": {
"type": "boolean",
"default": true,
"markdownDescription": "Auto-check rust-analyzer updates on startup"
},
"rust-analyzer.updates.channel": {
"type": "string",
"default": "stable",
"enum": [
"stable",
"nightly"
],
"markdownDescription": "Choose `\"nightly\"` updates to get the latest features and bug fixes every day. While `\"stable\"` releases occur weekly and don't contain cutting-edge features from VSCode proposed APIs",
"enumDescriptions": [
"`\"stable\"` updates are shipped weekly, they don't contain cutting-edge features from VSCode proposed APIs but have less bugs in general",
"`\"nightly\"` updates are shipped daily (extension updates automatically by downloading artifacts directly from GitHub), they contain cutting-edge features and latest bug fixes. These releases help us get your feedback very quickly and speed up rust-analyzer development **drastically**"
]
},
"rust-analyzer.assist.emitMustUse": {
"markdownDescription": "Whether to insert #[must_use] when generating `as_` methods\nfor enum variants.",
"default": false,
"type": "boolean"
},
"rust-analyzer.assist.expressionFillDefault": {
"markdownDescription": "Placeholder expression to use for missing expressions in assists.",
"default": "todo",
"type": "string",
"enum": [
"todo",
"default"
],
"enumDescriptions": [
"Fill missing expressions with the `todo` macro",
"Fill missing expressions with reasonable defaults, `new` or `default` constructors."
]
},
"rust-analyzer.assist.termSearch.borrowcheck": {
"markdownDescription": "Enable borrow checking for term search code assists. If set to false, also there will be more suggestions, but some of them may not borrow-check.",
"default": true,
"type": "boolean"
},
"rust-analyzer.assist.termSearch.fuel": {
"markdownDescription": "Term search fuel in \"units of work\" for assists (Defaults to 1800).",
"default": 1800,
"type": "integer",
"minimum": 0
},
"rust-analyzer.cachePriming.enable": {
"markdownDescription": "Warm up caches on project load.",
"default": true,
"type": "boolean"
},
"rust-analyzer.cachePriming.numThreads": {
"markdownDescription": "How many worker threads to handle priming caches. The default `0` means to pick automatically.",
"default": "physical",
"anyOf": [
{
"type": "number",
"minimum": 0,
"maximum": 255
},
{
"type": "string",
"enum": [
"physical",
"logical"
],
"enumDescriptions": [
"Use the number of physical cores",
"Use the number of logical cores"
]
}
]
},
"rust-analyzer.cargo.allTargets": {
"markdownDescription": "Pass `--all-targets` to cargo invocation.",
"default": true,
"type": "boolean"
},
"rust-analyzer.cargo.autoreload": {
"markdownDescription": "Automatically refresh project info via `cargo metadata` on\n`Cargo.toml` or `.cargo/config.toml` changes.",
"default": true,
"type": "boolean"
},
"rust-analyzer.cargo.buildScripts.enable": {
"markdownDescription": "Run build scripts (`build.rs`) for more precise code analysis.",
"default": true,
"type": "boolean"
},
"rust-analyzer.cargo.buildScripts.invocationStrategy": {
"markdownDescription": "Specifies the invocation strategy to use when running the build scripts command.\nIf `per_workspace` is set, the command will be executed for each Rust workspace with the\nworkspace as the working directory.\nIf `once` is set, the command will be executed once with the opened project as the\nworking directory.\nThis config only has an effect when `#rust-analyzer.cargo.buildScripts.overrideCommand#`\nis set.",
"default": "per_workspace",
"type": "string",
"enum": [
"per_workspace",
"once"
],
"enumDescriptions": [
"The command will be executed for each Rust workspace with the workspace as the working directory.",
"The command will be executed once with the opened project as the working directory."
]
},
"rust-analyzer.cargo.buildScripts.overrideCommand": {
"markdownDescription": "Override the command rust-analyzer uses to run build scripts and\nbuild procedural macros. The command is required to output json\nand should therefore include `--message-format=json` or a similar\noption.\n\nIf there are multiple linked projects/workspaces, this command is invoked for\neach of them, with the working directory being the workspace root\n(i.e., the folder containing the `Cargo.toml`). This can be overwritten\nby changing `#rust-analyzer.cargo.buildScripts.invocationStrategy#`.\n\nBy default, a cargo invocation will be constructed for the configured\ntargets and features, with the following base command line:\n\n```bash\ncargo check --quiet --workspace --message-format=json --all-targets --keep-going\n```\n.",
"default": null,
"type": [
"null",
"array"
],
"items": {
"type": "string"
}
},
"rust-analyzer.cargo.buildScripts.rebuildOnSave": {
"markdownDescription": "Rerun proc-macros building/build-scripts running when proc-macro\nor build-script sources change and are saved.",
"default": true,
"type": "boolean"
},
"rust-analyzer.cargo.buildScripts.useRustcWrapper": {
"markdownDescription": "Use `RUSTC_WRAPPER=rust-analyzer` when running build scripts to\navoid checking unnecessary things.",
"default": true,
"type": "boolean"
},
"rust-analyzer.cargo.cfgs": {
"markdownDescription": "List of cfg options to enable with the given values.",
"default": {
"miri": null,
"debug_assertions": null
},
"type": "object"
},
"rust-analyzer.cargo.extraArgs": {
"markdownDescription": "Extra arguments that are passed to every cargo invocation.",
"default": [],
"type": "array",
"items": {
"type": "string"
}
},
"rust-analyzer.cargo.extraEnv": {
"markdownDescription": "Extra environment variables that will be set when running cargo, rustc\nor other commands within the workspace. Useful for setting RUSTFLAGS.",
"default": {},
"type": "object"
},
"rust-analyzer.cargo.features": {
"markdownDescription": "List of features to activate.\n\nSet this to `\"all\"` to pass `--all-features` to cargo.",
"default": [],
"anyOf": [
{
"type": "string",
"enum": [
"all"
],
"enumDescriptions": [
"Pass `--all-features` to cargo"
]
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"rust-analyzer.cargo.noDefaultFeatures": {
"markdownDescription": "Whether to pass `--no-default-features` to cargo.",
"default": false,
"type": "boolean"
},
"rust-analyzer.cargo.sysroot": {
"markdownDescription": "Relative path to the sysroot, or \"discover\" to try to automatically find it via\n\"rustc --print sysroot\".\n\nUnsetting this disables sysroot loading.\n\nThis option does not take effect until rust-analyzer is restarted.",
"default": "discover",
"type": [
"null",
"string"
]
},
"rust-analyzer.cargo.sysrootSrc": {
"markdownDescription": "Relative path to the sysroot library sources. If left unset, this will default to\n`{cargo.sysroot}/lib/rustlib/src/rust/library`.\n\nThis option does not take effect until rust-analyzer is restarted.",
"default": null,
"type": [
"null",
"string"
]
},
"rust-analyzer.cargo.target": {
"markdownDescription": "Compilation target override (target triple).",
"default": null,
"type": [
"null",
"string"
]
},
"rust-analyzer.cargo.targetDir": {
"markdownDescription": "Optional path to a rust-analyzer specific target directory.\nThis prevents rust-analyzer's `cargo check` and initial build-script and proc-macro\nbuilding from locking the `Cargo.lock` at the expense of duplicating build artifacts.\n\nSet to `true` to use a subdirectory of the existing target directory or\nset to a path relative to the workspace to use that path.",
"default": null,
"anyOf": [
{
"type": "null"
},
{
"type": "boolean"
},
{
"type": "string"
}
]
},
"rust-analyzer.cfg.setTest": {
"markdownDescription": "Set `cfg(test)` for local crates. Defaults to true.",
"default": true,
"type": "boolean"
},
"rust-analyzer.checkOnSave": {
"markdownDescription": "Run the check command for diagnostics on save.",
"default": true,
"type": "boolean"
},
"rust-analyzer.check.allTargets": {
"markdownDescription": "Check all targets and tests (`--all-targets`). Defaults to\n`#rust-analyzer.cargo.allTargets#`.",
"default": null,
"type": [
"null",
"boolean"
]
},
"rust-analyzer.check.command": {
"markdownDescription": "Cargo command to use for `cargo check`.",
"default": "check",
"type": "string"
},
"rust-analyzer.check.extraArgs": {
"markdownDescription": "Extra arguments for `cargo check`.",
"default": [],
"type": "array",
"items": {
"type": "string"
}
},
"rust-analyzer.check.extraEnv": {
"markdownDescription": "Extra environment variables that will be set when running `cargo check`.\nExtends `#rust-analyzer.cargo.extraEnv#`.",
"default": {},
"type": "object"
},
"rust-analyzer.check.features": {
"markdownDescription": "List of features to activate. Defaults to\n`#rust-analyzer.cargo.features#`.\n\nSet to `\"all\"` to pass `--all-features` to Cargo.",
"default": null,
"anyOf": [
{
"type": "string",
"enum": [
"all"
],
"enumDescriptions": [
"Pass `--all-features` to cargo"
]
},
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"rust-analyzer.check.ignore": {
"markdownDescription": "List of `cargo check` (or other command specified in `check.command`) diagnostics to ignore.\n\nFor example for `cargo check`: `dead_code`, `unused_imports`, `unused_variables`,...",
"default": [],
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true
},
"rust-analyzer.check.invocationStrategy": {
"markdownDescription": "Specifies the invocation strategy to use when running the check command.\nIf `per_workspace` is set, the command will be executed for each workspace.\nIf `once` is set, the command will be executed once.\nThis config only has an effect when `#rust-analyzer.check.overrideCommand#`\nis set.",
"default": "per_workspace",
"type": "string",
"enum": [
"per_workspace",
"once"
],
"enumDescriptions": [
"The command will be executed for each Rust workspace with the workspace as the working directory.",
"The command will be executed once with the opened project as the working directory."
]
},
"rust-analyzer.check.noDefaultFeatures": {
"markdownDescription": "Whether to pass `--no-default-features` to Cargo. Defaults to\n`#rust-analyzer.cargo.noDefaultFeatures#`.",
"default": null,
"type": [
"null",
"boolean"
]
},
"rust-analyzer.check.overrideCommand": {
"markdownDescription": "Override the command rust-analyzer uses instead of `cargo check` for\ndiagnostics on save. The command is required to output json and\nshould therefore include `--message-format=json` or a similar option\n(if your client supports the `colorDiagnosticOutput` experimental\ncapability, you can use `--message-format=json-diagnostic-rendered-ansi`).\n\nIf you're changing this because you're using some tool wrapping\nCargo, you might also want to change\n`#rust-analyzer.cargo.buildScripts.overrideCommand#`.\n\nIf there are multiple linked projects/workspaces, this command is invoked for\neach of them, with the working directory being the workspace root\n(i.e., the folder containing the `Cargo.toml`). This can be overwritten\nby changing `#rust-analyzer.check.invocationStrategy#`.\n\nIf `$saved_file` is part of the command, rust-analyzer will pass\nthe absolute path of the saved file to the provided command. This is\nintended to be used with non-Cargo build systems.\nNote that `$saved_file` is experimental and may be removed in the future.\n\nAn example command would be:\n\n```bash\ncargo check --workspace --message-format=json --all-targets\n```\n.",
"default": null,
"type": [
"null",
"array"
],
"items": {
"type": "string"
}
},
"rust-analyzer.check.targets": {
"markdownDescription": "Check for specific targets. Defaults to `#rust-analyzer.cargo.target#` if empty.\n\nCan be a single target, e.g. `\"x86_64-unknown-linux-gnu\"` or a list of targets, e.g.\n`[\"aarch64-apple-darwin\", \"x86_64-apple-darwin\"]`.\n\nAliased as `\"checkOnSave.targets\"`.",
"default": null,
"anyOf": [
{
"type": "null"
},
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"rust-analyzer.check.workspace": {
"markdownDescription": "Whether `--workspace` should be passed to `cargo check`.\nIf false, `-p <package>` will be passed instead.",
"default": true,
"type": "boolean"
},
"rust-analyzer.completion.addSemicolonToUnit": {
"markdownDescription": "Whether to automatically add a semicolon when completing unit-returning functions.\n\nIn `match` arms it completes a comma instead.",
"default": true,
"type": "boolean"
},
"rust-analyzer.completion.autoimport.enable": {
"markdownDescription": "Toggles the additional completions that automatically add imports when completed.\nNote that your client must specify the `additionalTextEdits` LSP client capability to truly have this feature enabled.",
"default": true,
"type": "boolean"
},
"rust-analyzer.completion.autoself.enable": {
"markdownDescription": "Toggles the additional completions that automatically show method calls and field accesses\nwith `self` prefixed to them when inside a method.",
"default": true,
"type": "boolean"
},
"rust-analyzer.completion.callable.snippets": {
"markdownDescription": "Whether to add parenthesis and argument snippets when completing function.",
"default": "fill_arguments",
"type": "string",
"enum": [
"fill_arguments",
"add_parentheses",
"none"
],
"enumDescriptions": [
"Add call parentheses and pre-fill arguments.",
"Add call parentheses.",
"Do no snippet completions for callables."
]
},
"rust-analyzer.completion.fullFunctionSignatures.enable": {
"markdownDescription": "Whether to show full function/method signatures in completion docs.",
"default": false,
"type": "boolean"
},
"rust-analyzer.completion.hideDeprecated": {
"markdownDescription": "Whether to omit deprecated items from autocompletion. By default they are marked as deprecated but not hidden.",
"default": false,
"type": "boolean"
},
"rust-analyzer.completion.limit": {
"markdownDescription": "Maximum number of completions to return. If `None`, the limit is infinite.",
"default": null,
"type": [
"null",
"integer"
],
"minimum": 0
},
"rust-analyzer.completion.postfix.enable": {
"markdownDescription": "Whether to show postfix snippets like `dbg`, `if`, `not`, etc.",
"default": true,
"type": "boolean"
},
"rust-analyzer.completion.privateEditable.enable": {
"markdownDescription": "Enables completions of private items and fields that are defined in the current workspace even if they are not visible at the current position.",
"default": false,
"type": "boolean"
},
"rust-analyzer.completion.snippets.custom": {
"markdownDescription": "Custom completion snippets.",
"default": {
"Ok": {
"postfix": "ok",
"body": "Ok(${receiver})",
"description": "Wrap the expression in a `Result::Ok`",
"scope": "expr"
},
"Box::pin": {
"postfix": "pinbox",
"body": "Box::pin(${receiver})",
"requires": "std::boxed::Box",
"description": "Put the expression into a pinned `Box`",
"scope": "expr"
},
"Arc::new": {
"postfix": "arc",
"body": "Arc::new(${receiver})",
"requires": "std::sync::Arc",
"description": "Put the expression into an `Arc`",
"scope": "expr"
},
"Some": {
"postfix": "some",
"body": "Some(${receiver})",
"description": "Wrap the expression in an `Option::Some`",
"scope": "expr"
},
"Err": {
"postfix": "err",
"body": "Err(${receiver})",
"description": "Wrap the expression in a `Result::Err`",
"scope": "expr"
},
"Rc::new": {
"postfix": "rc",
"body": "Rc::new(${receiver})",
"requires": "std::rc::Rc",
"description": "Put the expression into an `Rc`",
"scope": "expr"
}
},
"type": "object"
},
"rust-analyzer.completion.termSearch.enable": {
"markdownDescription": "Whether to enable term search based snippets like `Some(foo.bar().baz())`.",
"default": false,
"type": "boolean"
},
"rust-analyzer.completion.termSearch.fuel": {
"markdownDescription": "Term search fuel in \"units of work\" for autocompletion (Defaults to 1000).",
"default": 1000,
"type": "integer",
"minimum": 0
},
"rust-analyzer.diagnostics.disabled": {
"markdownDescription": "List of rust-analyzer diagnostics to disable.",
"default": [],
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true
},
"rust-analyzer.diagnostics.enable": {
"markdownDescription": "Whether to show native rust-analyzer diagnostics.",
"default": true,
"type": "boolean"
},
"rust-analyzer.diagnostics.experimental.enable": {
"markdownDescription": "Whether to show experimental rust-analyzer diagnostics that might\nhave more false positives than usual.",
"default": false,
"type": "boolean"
},
"rust-analyzer.diagnostics.remapPrefix": {
"markdownDescription": "Map of prefixes to be substituted when parsing diagnostic file paths.\nThis should be the reverse mapping of what is passed to `rustc` as `--remap-path-prefix`.",
"default": {},
"type": "object"
},
"rust-analyzer.diagnostics.styleLints.enable": {
"markdownDescription": "Whether to run additional style lints.",
"default": false,
"type": "boolean"
},
"rust-analyzer.diagnostics.warningsAsHint": {
"markdownDescription": "List of warnings that should be displayed with hint severity.\n\nThe warnings will be indicated by faded text or three dots in code\nand will not show up in the `Problems Panel`.",
"default": [],
"type": "array",
"items": {
"type": "string"
}
},
"rust-analyzer.diagnostics.warningsAsInfo": {
"markdownDescription": "List of warnings that should be displayed with info severity.\n\nThe warnings will be indicated by a blue squiggly underline in code\nand a blue icon in the `Problems Panel`.",
"default": [],
"type": "array",
"items": {
"type": "string"
}
},
"rust-analyzer.files.excludeDirs": {
"markdownDescription": "These directories will be ignored by rust-analyzer. They are\nrelative to the workspace root, and globs are not supported. You may\nalso need to add the folders to Code's `files.watcherExclude`.",
"default": [],
"type": "array",
"items": {
"type": "string"
}
},
"rust-analyzer.files.watcher": {
"markdownDescription": "Controls file watching implementation.",
"default": "client",
"type": "string",
"enum": [
"client",
"server"
],
"enumDescriptions": [
"Use the client (editor) to watch files for changes",
"Use server-side file watching"
]
},
"rust-analyzer.highlightRelated.breakPoints.enable": {
"markdownDescription": "Enables highlighting of related references while the cursor is on `break`, `loop`, `while`, or `for` keywords.",
"default": true,
"type": "boolean"
},
"rust-analyzer.highlightRelated.closureCaptures.enable": {
"markdownDescription": "Enables highlighting of all captures of a closure while the cursor is on the `|` or move keyword of a closure.",
"default": true,
"type": "boolean"
},
"rust-analyzer.highlightRelated.exitPoints.enable": {
"markdownDescription": "Enables highlighting of all exit points while the cursor is on any `return`, `?`, `fn`, or return type arrow (`->`).",
"default": true,
"type": "boolean"
},
"rust-analyzer.highlightRelated.references.enable": {
"markdownDescription": "Enables highlighting of related references while the cursor is on any identifier.",
"default": true,
"type": "boolean"
},
"rust-analyzer.highlightRelated.yieldPoints.enable": {
"markdownDescription": "Enables highlighting of all break points for a loop or block context while the cursor is on any `async` or `await` keywords.",
"default": true,
"type": "boolean"
},
"rust-analyzer.hover.documentation.enable": {
"markdownDescription": "Whether to show documentation on hover.",
"default": true,
"type": "boolean"
},
"rust-analyzer.hover.documentation.keywords.enable": {
"markdownDescription": "Whether to show keyword hover popups. Only applies when\n`#rust-analyzer.hover.documentation.enable#` is set.",
"default": true,
"type": "boolean"
},
"rust-analyzer.hover.links.enable": {
"markdownDescription": "Use markdown syntax for links on hover.",
"default": true,
"type": "boolean"
},
"rust-analyzer.hover.memoryLayout.alignment": {
"markdownDescription": "How to render the align information in a memory layout hover.",
"default": "hexadecimal",
"anyOf": [
{
"type": "null"
},
{
"type": "string",
"enum": [
"both",
"decimal",
"hexadecimal"
],
"enumDescriptions": [
"Render as 12 (0xC)",
"Render as 12",
"Render as 0xC"
]
}
]
},
"rust-analyzer.hover.memoryLayout.enable": {
"markdownDescription": "Whether to show memory layout data on hover.",
"default": true,
"type": "boolean"
},
"rust-analyzer.hover.memoryLayout.niches": {
"markdownDescription": "How to render the niche information in a memory layout hover.",
"default": false,
"type": [
"null",
"boolean"
]
},
"rust-analyzer.hover.memoryLayout.offset": {
"markdownDescription": "How to render the offset information in a memory layout hover.",
"default": "hexadecimal",
"anyOf": [
{
"type": "null"
},
{
"type": "string",
"enum": [
"both",
"decimal",
"hexadecimal"
],
"enumDescriptions": [
"Render as 12 (0xC)",
"Render as 12",
"Render as 0xC"
]
}
]
},
"rust-analyzer.hover.memoryLayout.size": {
"markdownDescription": "How to render the size information in a memory layout hover.",
"default": "both",
"anyOf": [
{
"type": "null"
},
{
"type": "string",
"enum": [
"both",
"decimal",
"hexadecimal"
],
"enumDescriptions": [
"Render as 12 (0xC)",
"Render as 12",
"Render as 0xC"
]
}
]
},
"rust-analyzer.hover.show.enumVariants": {
"markdownDescription": "How many variants of an enum to display when hovering on. Show none if empty.",
"default": 5,
"type": [
"null",
"integer"
],
"minimum": 0
},
"rust-analyzer.hover.show.fields": {
"markdownDescription": "How many fields of a struct, variant or union to display when hovering on. Show none if empty.",
"default": 5,
"type": [
"null",
"integer"
],
"minimum": 0
},
"rust-analyzer.hover.show.traitAssocItems": {
"markdownDescription": "How many associated items of a trait to display when hovering a trait.",
"default": null,
"type": [
"null",
"integer"
],
"minimum": 0
},
"rust-analyzer.imports.granularity.enforce": {
"markdownDescription": "Whether to enforce the import granularity setting for all files. If set to false rust-analyzer will try to keep import styles consistent per file.",
"default": false,
"type": "boolean"
},
"rust-analyzer.imports.granularity.group": {
"markdownDescription": "How imports should be grouped into use statements.",
"default": "crate",
"type": "string",
"enum": [
"preserve",
"crate",
"module",
"item",
"one"
],
"enumDescriptions": [
"Do not change the granularity of any imports and preserve the original structure written by the developer.",
"Merge imports from the same crate into a single use statement. Conversely, imports from different crates are split into separate statements.",
"Merge imports from the same module into a single use statement. Conversely, imports from different modules are split into separate statements.",
"Flatten imports so that each has its own use statement.",
"Merge all imports into a single use statement as long as they have the same visibility and attributes."
]
},
"rust-analyzer.imports.group.enable": {
"markdownDescription": "Group inserted imports by the https://rust-analyzer.github.io/manual.html#auto-import[following order]. Groups are separated by newlines.",
"default": true,
"type": "boolean"
},
"rust-analyzer.imports.merge.glob": {
"markdownDescription": "Whether to allow import insertion to merge new imports into single path glob imports like `use std::fmt::*;`.",
"default": true,
"type": "boolean"
},
"rust-analyzer.imports.preferNoStd": {
"markdownDescription": "Prefer to unconditionally use imports of the core and alloc crate, over the std crate.",
"default": false,
"type": "boolean"
},
"rust-analyzer.imports.preferPrelude": {
"markdownDescription": "Whether to prefer import paths containing a `prelude` module.",
"default": false,
"type": "boolean"
},
"rust-analyzer.imports.prefix": {
"markdownDescription": "The path structure for newly inserted paths to use.",
"default": "plain",
"type": "string",
"enum": [
"plain",
"self",
"crate"
],
"enumDescriptions": [
"Insert import paths relative to the current module, using up to one `super` prefix if the parent module contains the requested item.",
"Insert import paths relative to the current module, using up to one `super` prefix if the parent module contains the requested item. Prefixes `self` in front of the path if it starts with a module.",
"Force import paths to be absolute by always starting them with `crate` or the extern crate name they come from."
]
},
"rust-analyzer.imports.prefixExternPrelude": {
"markdownDescription": "Whether to prefix external (including std, core) crate imports with `::`. e.g. \"use ::std::io::Read;\".",
"default": false,
"type": "boolean"
},
"rust-analyzer.inlayHints.bindingModeHints.enable": {
"markdownDescription": "Whether to show inlay type hints for binding modes.",
"default": false,
"type": "boolean"
},
"rust-analyzer.inlayHints.chainingHints.enable": {
"markdownDescription": "Whether to show inlay type hints for method chains.",
"default": true,
"type": "boolean"
},
"rust-analyzer.inlayHints.closingBraceHints.enable": {
"markdownDescription": "Whether to show inlay hints after a closing `}` to indicate what item it belongs to.",
"default": true,
"type": "boolean"
},
"rust-analyzer.inlayHints.closingBraceHints.minLines": {
"markdownDescription": "Minimum number of lines required before the `}` until the hint is shown (set to 0 or 1\nto always show them).",
"default": 25,
"type": "integer",
"minimum": 0
},
"rust-analyzer.inlayHints.closureCaptureHints.enable": {
"markdownDescription": "Whether to show inlay hints for closure captures.",
"default": false,
"type": "boolean"
},
"rust-analyzer.inlayHints.closureReturnTypeHints.enable": {
"markdownDescription": "Whether to show inlay type hints for return types of closures.",
"default": "never",
"type": "string",
"enum": [
"always",
"never",
"with_block"
],
"enumDescriptions": [
"Always show type hints for return types of closures.",
"Never show type hints for return types of closures.",
"Only show type hints for return types of closures with blocks."
]
},
"rust-analyzer.inlayHints.closureStyle": {
"markdownDescription": "Closure notation in type and chaining inlay hints.",
"default": "impl_fn",
"type": "string",
"enum": [
"impl_fn",
"rust_analyzer",
"with_id",
"hide"
],
"enumDescriptions": [
"`impl_fn`: `impl FnMut(i32, u64) -> i8`",
"`rust_analyzer`: `|i32, u64| -> i8`",
"`with_id`: `{closure#14352}`, where that id is the unique number of the closure in r-a internals",
"`hide`: Shows `...` for every closure type"
]
},
"rust-analyzer.inlayHints.discriminantHints.enable": {
"markdownDescription": "Whether to show enum variant discriminant hints.",
"default": "never",
"type": "string",
"enum": [
"always",
"never",
"fieldless"
],
"enumDescriptions": [
"Always show all discriminant hints.",
"Never show discriminant hints.",
"Only show discriminant hints on fieldless enum variants."
]
},
"rust-analyzer.inlayHints.expressionAdjustmentHints.enable": {
"markdownDescription": "Whether to show inlay hints for type adjustments.",
"default": "never",
"type": "string",
"enum": [
"always",
"never",
"reborrow"
],
"enumDescriptions": [
"Always show all adjustment hints.",
"Never show adjustment hints.",
"Only show auto borrow and dereference adjustment hints."
]
},
"rust-analyzer.inlayHints.expressionAdjustmentHints.hideOutsideUnsafe": {
"markdownDescription": "Whether to hide inlay hints for type adjustments outside of `unsafe` blocks.",
"default": false,
"type": "boolean"
},
"rust-analyzer.inlayHints.expressionAdjustmentHints.mode": {
"markdownDescription": "Whether to show inlay hints as postfix ops (`.*` instead of `*`, etc).",
"default": "prefix",
"type": "string",
"enum": [
"prefix",
"postfix",
"prefer_prefix",
"prefer_postfix"
],
"enumDescriptions": [
"Always show adjustment hints as prefix (`*expr`).",
"Always show adjustment hints as postfix (`expr.*`).",
"Show prefix or postfix depending on which uses less parenthesis, preferring prefix.",
"Show prefix or postfix depending on which uses less parenthesis, preferring postfix."
]
},
"rust-analyzer.inlayHints.genericParameterHints.const.enable": {
"markdownDescription": "Whether to show const generic parameter name inlay hints.",
"default": true,
"type": "boolean"
},
"rust-analyzer.inlayHints.genericParameterHints.lifetime.enable": {
"markdownDescription": "Whether to show generic lifetime parameter name inlay hints.",