]> git.lizzy.rs Git - rust.git/blob - docs/user/generated_config.adoc
Simplify
[rust.git] / docs / user / generated_config.adoc
1 [[rust-analyzer.assist.expressionFillDefault]]rust-analyzer.assist.expressionFillDefault (default: `"todo"`)::
2 +
3 --
4 Placeholder expression to use for missing expressions in assists.
5 --
6 [[rust-analyzer.cachePriming.enable]]rust-analyzer.cachePriming.enable (default: `true`)::
7 +
8 --
9 Warm up caches on project load.
10 --
11 [[rust-analyzer.cachePriming.numThreads]]rust-analyzer.cachePriming.numThreads (default: `0`)::
12 +
13 --
14 How many worker threads to handle priming caches. The default `0` means to pick automatically.
15 --
16 [[rust-analyzer.cargo.autoreload]]rust-analyzer.cargo.autoreload (default: `true`)::
17 +
18 --
19 Automatically refresh project info via `cargo metadata` on
20 `Cargo.toml` or `.cargo/config.toml` changes.
21 --
22 [[rust-analyzer.cargo.buildScripts.enable]]rust-analyzer.cargo.buildScripts.enable (default: `true`)::
23 +
24 --
25 Run build scripts (`build.rs`) for more precise code analysis.
26 --
27 [[rust-analyzer.cargo.buildScripts.overrideCommand]]rust-analyzer.cargo.buildScripts.overrideCommand (default: `null`)::
28 +
29 --
30 Override the command rust-analyzer uses to run build scripts and
31 build procedural macros. The command is required to output json
32 and should therefore include `--message-format=json` or a similar
33 option.
34
35 By default, a cargo invocation will be constructed for the configured
36 targets and features, with the following base command line:
37
38 ```bash
39 cargo check --quiet --workspace --message-format=json --all-targets
40 ```
41 .
42 --
43 [[rust-analyzer.cargo.buildScripts.useRustcWrapper]]rust-analyzer.cargo.buildScripts.useRustcWrapper (default: `true`)::
44 +
45 --
46 Use `RUSTC_WRAPPER=rust-analyzer` when running build scripts to
47 avoid checking unnecessary things.
48 --
49 [[rust-analyzer.cargo.extraEnv]]rust-analyzer.cargo.extraEnv (default: `{}`)::
50 +
51 --
52 Extra environment variables that will be set when running cargo, rustc
53 or other commands within the workspace. Useful for setting RUSTFLAGS.
54 --
55 [[rust-analyzer.cargo.features]]rust-analyzer.cargo.features (default: `[]`)::
56 +
57 --
58 List of features to activate.
59
60 Set this to `"all"` to pass `--all-features` to cargo.
61 --
62 [[rust-analyzer.cargo.noDefaultFeatures]]rust-analyzer.cargo.noDefaultFeatures (default: `false`)::
63 +
64 --
65 Whether to pass `--no-default-features` to cargo.
66 --
67 [[rust-analyzer.cargo.noSysroot]]rust-analyzer.cargo.noSysroot (default: `false`)::
68 +
69 --
70 Internal config for debugging, disables loading of sysroot crates.
71 --
72 [[rust-analyzer.cargo.target]]rust-analyzer.cargo.target (default: `null`)::
73 +
74 --
75 Compilation target override (target triple).
76 --
77 [[rust-analyzer.cargo.unsetTest]]rust-analyzer.cargo.unsetTest (default: `["core"]`)::
78 +
79 --
80 Unsets `#[cfg(test)]` for the specified crates.
81 --
82 [[rust-analyzer.checkOnSave.allTargets]]rust-analyzer.checkOnSave.allTargets (default: `true`)::
83 +
84 --
85 Check all targets and tests (`--all-targets`).
86 --
87 [[rust-analyzer.checkOnSave.command]]rust-analyzer.checkOnSave.command (default: `"check"`)::
88 +
89 --
90 Cargo command to use for `cargo check`.
91 --
92 [[rust-analyzer.checkOnSave.enable]]rust-analyzer.checkOnSave.enable (default: `true`)::
93 +
94 --
95 Run specified `cargo check` command for diagnostics on save.
96 --
97 [[rust-analyzer.checkOnSave.extraArgs]]rust-analyzer.checkOnSave.extraArgs (default: `[]`)::
98 +
99 --
100 Extra arguments for `cargo check`.
101 --
102 [[rust-analyzer.checkOnSave.extraEnv]]rust-analyzer.checkOnSave.extraEnv (default: `{}`)::
103 +
104 --
105 Extra environment variables that will be set when running `cargo check`.
106 Extends `#rust-analyzer.cargo.extraEnv#`.
107 --
108 [[rust-analyzer.checkOnSave.features]]rust-analyzer.checkOnSave.features (default: `null`)::
109 +
110 --
111 List of features to activate. Defaults to
112 `#rust-analyzer.cargo.features#`.
113
114 Set to `"all"` to pass `--all-features` to Cargo.
115 --
116 [[rust-analyzer.checkOnSave.noDefaultFeatures]]rust-analyzer.checkOnSave.noDefaultFeatures (default: `null`)::
117 +
118 --
119 Whether to pass `--no-default-features` to Cargo. Defaults to
120 `#rust-analyzer.cargo.noDefaultFeatures#`.
121 --
122 [[rust-analyzer.checkOnSave.overrideCommand]]rust-analyzer.checkOnSave.overrideCommand (default: `null`)::
123 +
124 --
125 Override the command rust-analyzer uses instead of `cargo check` for
126 diagnostics on save. The command is required to output json and
127 should therefor include `--message-format=json` or a similar option.
128
129 If you're changing this because you're using some tool wrapping
130 Cargo, you might also want to change
131 `#rust-analyzer.cargo.buildScripts.overrideCommand#`.
132
133 If there are multiple linked projects, this command is invoked for
134 each of them, with the working directory being the project root
135 (i.e., the folder containing the `Cargo.toml`).
136
137 An example command would be:
138
139 ```bash
140 cargo check --workspace --message-format=json --all-targets
141 ```
142 .
143 --
144 [[rust-analyzer.checkOnSave.target]]rust-analyzer.checkOnSave.target (default: `null`)::
145 +
146 --
147 Check for a specific target. Defaults to
148 `#rust-analyzer.cargo.target#`.
149 --
150 [[rust-analyzer.completion.autoimport.enable]]rust-analyzer.completion.autoimport.enable (default: `true`)::
151 +
152 --
153 Toggles the additional completions that automatically add imports when completed.
154 Note that your client must specify the `additionalTextEdits` LSP client capability to truly have this feature enabled.
155 --
156 [[rust-analyzer.completion.autoself.enable]]rust-analyzer.completion.autoself.enable (default: `true`)::
157 +
158 --
159 Toggles the additional completions that automatically show method calls and field accesses
160 with `self` prefixed to them when inside a method.
161 --
162 [[rust-analyzer.completion.callable.snippets]]rust-analyzer.completion.callable.snippets (default: `"fill_arguments"`)::
163 +
164 --
165 Whether to add parenthesis and argument snippets when completing function.
166 --
167 [[rust-analyzer.completion.postfix.enable]]rust-analyzer.completion.postfix.enable (default: `true`)::
168 +
169 --
170 Whether to show postfix snippets like `dbg`, `if`, `not`, etc.
171 --
172 [[rust-analyzer.completion.privateEditable.enable]]rust-analyzer.completion.privateEditable.enable (default: `false`)::
173 +
174 --
175 Enables completions of private items and fields that are defined in the current workspace even if they are not visible at the current position.
176 --
177 [[rust-analyzer.completion.snippets.custom]]rust-analyzer.completion.snippets.custom::
178 +
179 --
180 Default:
181 ----
182 {
183             "Arc::new": {
184                 "postfix": "arc",
185                 "body": "Arc::new(${receiver})",
186                 "requires": "std::sync::Arc",
187                 "description": "Put the expression into an `Arc`",
188                 "scope": "expr"
189             },
190             "Rc::new": {
191                 "postfix": "rc",
192                 "body": "Rc::new(${receiver})",
193                 "requires": "std::rc::Rc",
194                 "description": "Put the expression into an `Rc`",
195                 "scope": "expr"
196             },
197             "Box::pin": {
198                 "postfix": "pinbox",
199                 "body": "Box::pin(${receiver})",
200                 "requires": "std::boxed::Box",
201                 "description": "Put the expression into a pinned `Box`",
202                 "scope": "expr"
203             },
204             "Ok": {
205                 "postfix": "ok",
206                 "body": "Ok(${receiver})",
207                 "description": "Wrap the expression in a `Result::Ok`",
208                 "scope": "expr"
209             },
210             "Err": {
211                 "postfix": "err",
212                 "body": "Err(${receiver})",
213                 "description": "Wrap the expression in a `Result::Err`",
214                 "scope": "expr"
215             },
216             "Some": {
217                 "postfix": "some",
218                 "body": "Some(${receiver})",
219                 "description": "Wrap the expression in an `Option::Some`",
220                 "scope": "expr"
221             }
222         }
223 ----
224 Custom completion snippets.
225
226 --
227 [[rust-analyzer.diagnostics.disabled]]rust-analyzer.diagnostics.disabled (default: `[]`)::
228 +
229 --
230 List of rust-analyzer diagnostics to disable.
231 --
232 [[rust-analyzer.diagnostics.enable]]rust-analyzer.diagnostics.enable (default: `true`)::
233 +
234 --
235 Whether to show native rust-analyzer diagnostics.
236 --
237 [[rust-analyzer.diagnostics.experimental.enable]]rust-analyzer.diagnostics.experimental.enable (default: `false`)::
238 +
239 --
240 Whether to show experimental rust-analyzer diagnostics that might
241 have more false positives than usual.
242 --
243 [[rust-analyzer.diagnostics.remapPrefix]]rust-analyzer.diagnostics.remapPrefix (default: `{}`)::
244 +
245 --
246 Map of prefixes to be substituted when parsing diagnostic file paths.
247 This should be the reverse mapping of what is passed to `rustc` as `--remap-path-prefix`.
248 --
249 [[rust-analyzer.diagnostics.warningsAsHint]]rust-analyzer.diagnostics.warningsAsHint (default: `[]`)::
250 +
251 --
252 List of warnings that should be displayed with hint severity.
253
254 The warnings will be indicated by faded text or three dots in code
255 and will not show up in the `Problems Panel`.
256 --
257 [[rust-analyzer.diagnostics.warningsAsInfo]]rust-analyzer.diagnostics.warningsAsInfo (default: `[]`)::
258 +
259 --
260 List of warnings that should be displayed with info severity.
261
262 The warnings will be indicated by a blue squiggly underline in code
263 and a blue icon in the `Problems Panel`.
264 --
265 [[rust-analyzer.files.excludeDirs]]rust-analyzer.files.excludeDirs (default: `[]`)::
266 +
267 --
268 These directories will be ignored by rust-analyzer. They are
269 relative to the workspace root, and globs are not supported. You may
270 also need to add the folders to Code's `files.watcherExclude`.
271 --
272 [[rust-analyzer.files.watcher]]rust-analyzer.files.watcher (default: `"client"`)::
273 +
274 --
275 Controls file watching implementation.
276 --
277 [[rust-analyzer.highlightRelated.breakPoints.enable]]rust-analyzer.highlightRelated.breakPoints.enable (default: `true`)::
278 +
279 --
280 Enables highlighting of related references while the cursor is on `break`, `loop`, `while`, or `for` keywords.
281 --
282 [[rust-analyzer.highlightRelated.exitPoints.enable]]rust-analyzer.highlightRelated.exitPoints.enable (default: `true`)::
283 +
284 --
285 Enables highlighting of all exit points while the cursor is on any `return`, `?`, `fn`, or return type arrow (`->`).
286 --
287 [[rust-analyzer.highlightRelated.references.enable]]rust-analyzer.highlightRelated.references.enable (default: `true`)::
288 +
289 --
290 Enables highlighting of related references while the cursor is on any identifier.
291 --
292 [[rust-analyzer.highlightRelated.yieldPoints.enable]]rust-analyzer.highlightRelated.yieldPoints.enable (default: `true`)::
293 +
294 --
295 Enables highlighting of all break points for a loop or block context while the cursor is on any `async` or `await` keywords.
296 --
297 [[rust-analyzer.hover.actions.debug.enable]]rust-analyzer.hover.actions.debug.enable (default: `true`)::
298 +
299 --
300 Whether to show `Debug` action. Only applies when
301 `#rust-analyzer.hover.actions.enable#` is set.
302 --
303 [[rust-analyzer.hover.actions.enable]]rust-analyzer.hover.actions.enable (default: `true`)::
304 +
305 --
306 Whether to show HoverActions in Rust files.
307 --
308 [[rust-analyzer.hover.actions.gotoTypeDef.enable]]rust-analyzer.hover.actions.gotoTypeDef.enable (default: `true`)::
309 +
310 --
311 Whether to show `Go to Type Definition` action. Only applies when
312 `#rust-analyzer.hover.actions.enable#` is set.
313 --
314 [[rust-analyzer.hover.actions.implementations.enable]]rust-analyzer.hover.actions.implementations.enable (default: `true`)::
315 +
316 --
317 Whether to show `Implementations` action. Only applies when
318 `#rust-analyzer.hover.actions.enable#` is set.
319 --
320 [[rust-analyzer.hover.actions.references.enable]]rust-analyzer.hover.actions.references.enable (default: `false`)::
321 +
322 --
323 Whether to show `References` action. Only applies when
324 `#rust-analyzer.hover.actions.enable#` is set.
325 --
326 [[rust-analyzer.hover.actions.run.enable]]rust-analyzer.hover.actions.run.enable (default: `true`)::
327 +
328 --
329 Whether to show `Run` action. Only applies when
330 `#rust-analyzer.hover.actions.enable#` is set.
331 --
332 [[rust-analyzer.hover.documentation.enable]]rust-analyzer.hover.documentation.enable (default: `true`)::
333 +
334 --
335 Whether to show documentation on hover.
336 --
337 [[rust-analyzer.hover.documentation.keywords.enable]]rust-analyzer.hover.documentation.keywords.enable (default: `true`)::
338 +
339 --
340 Whether to show keyword hover popups. Only applies when
341 `#rust-analyzer.hover.documentation.enable#` is set.
342 --
343 [[rust-analyzer.hover.links.enable]]rust-analyzer.hover.links.enable (default: `true`)::
344 +
345 --
346 Use markdown syntax for links in hover.
347 --
348 [[rust-analyzer.imports.granularity.enforce]]rust-analyzer.imports.granularity.enforce (default: `false`)::
349 +
350 --
351 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.
352 --
353 [[rust-analyzer.imports.granularity.group]]rust-analyzer.imports.granularity.group (default: `"crate"`)::
354 +
355 --
356 How imports should be grouped into use statements.
357 --
358 [[rust-analyzer.imports.group.enable]]rust-analyzer.imports.group.enable (default: `true`)::
359 +
360 --
361 Group inserted imports by the https://rust-analyzer.github.io/manual.html#auto-import[following order]. Groups are separated by newlines.
362 --
363 [[rust-analyzer.imports.merge.glob]]rust-analyzer.imports.merge.glob (default: `true`)::
364 +
365 --
366 Whether to allow import insertion to merge new imports into single path glob imports like `use std::fmt::*;`.
367 --
368 [[rust-analyzer.imports.prefer.no.std]]rust-analyzer.imports.prefer.no.std (default: `false`)::
369 +
370 --
371 Prefer to unconditionally use imports of the core and alloc crate, over the std crate.
372 --
373 [[rust-analyzer.imports.prefix]]rust-analyzer.imports.prefix (default: `"plain"`)::
374 +
375 --
376 The path structure for newly inserted paths to use.
377 --
378 [[rust-analyzer.inlayHints.bindingModeHints.enable]]rust-analyzer.inlayHints.bindingModeHints.enable (default: `false`)::
379 +
380 --
381 Whether to show inlay type hints for binding modes.
382 --
383 [[rust-analyzer.inlayHints.chainingHints.enable]]rust-analyzer.inlayHints.chainingHints.enable (default: `true`)::
384 +
385 --
386 Whether to show inlay type hints for method chains.
387 --
388 [[rust-analyzer.inlayHints.closingBraceHints.enable]]rust-analyzer.inlayHints.closingBraceHints.enable (default: `true`)::
389 +
390 --
391 Whether to show inlay hints after a closing `}` to indicate what item it belongs to.
392 --
393 [[rust-analyzer.inlayHints.closingBraceHints.minLines]]rust-analyzer.inlayHints.closingBraceHints.minLines (default: `25`)::
394 +
395 --
396 Minimum number of lines required before the `}` until the hint is shown (set to 0 or 1
397 to always show them).
398 --
399 [[rust-analyzer.inlayHints.closureReturnTypeHints.enable]]rust-analyzer.inlayHints.closureReturnTypeHints.enable (default: `"never"`)::
400 +
401 --
402 Whether to show inlay type hints for return types of closures.
403 --
404 [[rust-analyzer.inlayHints.lifetimeElisionHints.enable]]rust-analyzer.inlayHints.lifetimeElisionHints.enable (default: `"never"`)::
405 +
406 --
407 Whether to show inlay type hints for elided lifetimes in function signatures.
408 --
409 [[rust-analyzer.inlayHints.lifetimeElisionHints.useParameterNames]]rust-analyzer.inlayHints.lifetimeElisionHints.useParameterNames (default: `false`)::
410 +
411 --
412 Whether to prefer using parameter names as the name for elided lifetime hints if possible.
413 --
414 [[rust-analyzer.inlayHints.maxLength]]rust-analyzer.inlayHints.maxLength (default: `25`)::
415 +
416 --
417 Maximum length for inlay hints. Set to null to have an unlimited length.
418 --
419 [[rust-analyzer.inlayHints.parameterHints.enable]]rust-analyzer.inlayHints.parameterHints.enable (default: `true`)::
420 +
421 --
422 Whether to show function parameter name inlay hints at the call
423 site.
424 --
425 [[rust-analyzer.inlayHints.reborrowHints.enable]]rust-analyzer.inlayHints.reborrowHints.enable (default: `"never"`)::
426 +
427 --
428 Whether to show inlay type hints for compiler inserted reborrows.
429 --
430 [[rust-analyzer.inlayHints.renderColons]]rust-analyzer.inlayHints.renderColons (default: `true`)::
431 +
432 --
433 Whether to render leading colons for type hints, and trailing colons for parameter hints.
434 --
435 [[rust-analyzer.inlayHints.typeHints.enable]]rust-analyzer.inlayHints.typeHints.enable (default: `true`)::
436 +
437 --
438 Whether to show inlay type hints for variables.
439 --
440 [[rust-analyzer.inlayHints.typeHints.hideClosureInitialization]]rust-analyzer.inlayHints.typeHints.hideClosureInitialization (default: `false`)::
441 +
442 --
443 Whether to hide inlay type hints for `let` statements that initialize to a closure.
444 Only applies to closures with blocks, same as `#rust-analyzer.inlayHints.closureReturnTypeHints.enable#`.
445 --
446 [[rust-analyzer.inlayHints.typeHints.hideNamedConstructor]]rust-analyzer.inlayHints.typeHints.hideNamedConstructor (default: `false`)::
447 +
448 --
449 Whether to hide inlay type hints for constructors.
450 --
451 [[rust-analyzer.joinLines.joinAssignments]]rust-analyzer.joinLines.joinAssignments (default: `true`)::
452 +
453 --
454 Join lines merges consecutive declaration and initialization of an assignment.
455 --
456 [[rust-analyzer.joinLines.joinElseIf]]rust-analyzer.joinLines.joinElseIf (default: `true`)::
457 +
458 --
459 Join lines inserts else between consecutive ifs.
460 --
461 [[rust-analyzer.joinLines.removeTrailingComma]]rust-analyzer.joinLines.removeTrailingComma (default: `true`)::
462 +
463 --
464 Join lines removes trailing commas.
465 --
466 [[rust-analyzer.joinLines.unwrapTrivialBlock]]rust-analyzer.joinLines.unwrapTrivialBlock (default: `true`)::
467 +
468 --
469 Join lines unwraps trivial blocks.
470 --
471 [[rust-analyzer.lens.debug.enable]]rust-analyzer.lens.debug.enable (default: `true`)::
472 +
473 --
474 Whether to show `Debug` lens. Only applies when
475 `#rust-analyzer.lens.enable#` is set.
476 --
477 [[rust-analyzer.lens.enable]]rust-analyzer.lens.enable (default: `true`)::
478 +
479 --
480 Whether to show CodeLens in Rust files.
481 --
482 [[rust-analyzer.lens.forceCustomCommands]]rust-analyzer.lens.forceCustomCommands (default: `true`)::
483 +
484 --
485 Internal config: use custom client-side commands even when the
486 client doesn't set the corresponding capability.
487 --
488 [[rust-analyzer.lens.implementations.enable]]rust-analyzer.lens.implementations.enable (default: `true`)::
489 +
490 --
491 Whether to show `Implementations` lens. Only applies when
492 `#rust-analyzer.lens.enable#` is set.
493 --
494 [[rust-analyzer.lens.location]]rust-analyzer.lens.location (default: `"above_name"`)::
495 +
496 --
497 Where to render annotations.
498 --
499 [[rust-analyzer.lens.references.adt.enable]]rust-analyzer.lens.references.adt.enable (default: `false`)::
500 +
501 --
502 Whether to show `References` lens for Struct, Enum, and Union.
503 Only applies when `#rust-analyzer.lens.enable#` is set.
504 --
505 [[rust-analyzer.lens.references.enumVariant.enable]]rust-analyzer.lens.references.enumVariant.enable (default: `false`)::
506 +
507 --
508 Whether to show `References` lens for Enum Variants.
509 Only applies when `#rust-analyzer.lens.enable#` is set.
510 --
511 [[rust-analyzer.lens.references.method.enable]]rust-analyzer.lens.references.method.enable (default: `false`)::
512 +
513 --
514 Whether to show `Method References` lens. Only applies when
515 `#rust-analyzer.lens.enable#` is set.
516 --
517 [[rust-analyzer.lens.references.trait.enable]]rust-analyzer.lens.references.trait.enable (default: `false`)::
518 +
519 --
520 Whether to show `References` lens for Trait.
521 Only applies when `#rust-analyzer.lens.enable#` is set.
522 --
523 [[rust-analyzer.lens.run.enable]]rust-analyzer.lens.run.enable (default: `true`)::
524 +
525 --
526 Whether to show `Run` lens. Only applies when
527 `#rust-analyzer.lens.enable#` is set.
528 --
529 [[rust-analyzer.linkedProjects]]rust-analyzer.linkedProjects (default: `[]`)::
530 +
531 --
532 Disable project auto-discovery in favor of explicitly specified set
533 of projects.
534
535 Elements must be paths pointing to `Cargo.toml`,
536 `rust-project.json`, or JSON objects in `rust-project.json` format.
537 --
538 [[rust-analyzer.lru.capacity]]rust-analyzer.lru.capacity (default: `null`)::
539 +
540 --
541 Number of syntax trees rust-analyzer keeps in memory. Defaults to 128.
542 --
543 [[rust-analyzer.notifications.cargoTomlNotFound]]rust-analyzer.notifications.cargoTomlNotFound (default: `true`)::
544 +
545 --
546 Whether to show `can't find Cargo.toml` error message.
547 --
548 [[rust-analyzer.procMacro.attributes.enable]]rust-analyzer.procMacro.attributes.enable (default: `true`)::
549 +
550 --
551 Expand attribute macros. Requires `#rust-analyzer.procMacro.enable#` to be set.
552 --
553 [[rust-analyzer.procMacro.enable]]rust-analyzer.procMacro.enable (default: `true`)::
554 +
555 --
556 Enable support for procedural macros, implies `#rust-analyzer.cargo.buildScripts.enable#`.
557 --
558 [[rust-analyzer.procMacro.ignored]]rust-analyzer.procMacro.ignored (default: `{}`)::
559 +
560 --
561 These proc-macros will be ignored when trying to expand them.
562
563 This config takes a map of crate names with the exported proc-macro names to ignore as values.
564 --
565 [[rust-analyzer.procMacro.server]]rust-analyzer.procMacro.server (default: `null`)::
566 +
567 --
568 Internal config, path to proc-macro server executable (typically,
569 this is rust-analyzer itself, but we override this in tests).
570 --
571 [[rust-analyzer.references.excludeImports]]rust-analyzer.references.excludeImports (default: `false`)::
572 +
573 --
574 Exclude imports from find-all-references.
575 --
576 [[rust-analyzer.runnables.command]]rust-analyzer.runnables.command (default: `null`)::
577 +
578 --
579 Command to be executed instead of 'cargo' for runnables.
580 --
581 [[rust-analyzer.runnables.extraArgs]]rust-analyzer.runnables.extraArgs (default: `[]`)::
582 +
583 --
584 Additional arguments to be passed to cargo for runnables such as
585 tests or binaries. For example, it may be `--release`.
586 --
587 [[rust-analyzer.rustc.source]]rust-analyzer.rustc.source (default: `null`)::
588 +
589 --
590 Path to the Cargo.toml of the rust compiler workspace, for usage in rustc_private
591 projects, or "discover" to try to automatically find it if the `rustc-dev` component
592 is installed.
593
594 Any project which uses rust-analyzer with the rustcPrivate
595 crates must set `[package.metadata.rust-analyzer] rustc_private=true` to use it.
596
597 This option does not take effect until rust-analyzer is restarted.
598 --
599 [[rust-analyzer.rustfmt.extraArgs]]rust-analyzer.rustfmt.extraArgs (default: `[]`)::
600 +
601 --
602 Additional arguments to `rustfmt`.
603 --
604 [[rust-analyzer.rustfmt.overrideCommand]]rust-analyzer.rustfmt.overrideCommand (default: `null`)::
605 +
606 --
607 Advanced option, fully override the command rust-analyzer uses for
608 formatting.
609 --
610 [[rust-analyzer.rustfmt.rangeFormatting.enable]]rust-analyzer.rustfmt.rangeFormatting.enable (default: `false`)::
611 +
612 --
613 Enables the use of rustfmt's unstable range formatting command for the
614 `textDocument/rangeFormatting` request. The rustfmt option is unstable and only
615 available on a nightly build.
616 --
617 [[rust-analyzer.semanticHighlighting.doc.comment.inject.enable]]rust-analyzer.semanticHighlighting.doc.comment.inject.enable (default: `true`)::
618 +
619 --
620 Inject additional highlighting into doc comments.
621
622 When enabled, rust-analyzer will highlight rust source in doc comments as well as intra
623 doc links.
624 --
625 [[rust-analyzer.semanticHighlighting.operator.enable]]rust-analyzer.semanticHighlighting.operator.enable (default: `true`)::
626 +
627 --
628 Use semantic tokens for operators.
629
630 When disabled, rust-analyzer will emit semantic tokens only for operator tokens when
631 they are tagged with modifiers.
632 --
633 [[rust-analyzer.semanticHighlighting.operator.specialization.enable]]rust-analyzer.semanticHighlighting.operator.specialization.enable (default: `false`)::
634 +
635 --
636 Use specialized semantic tokens for operators.
637
638 When enabled, rust-analyzer will emit special token types for operator tokens instead
639 of the generic `operator` token type.
640 --
641 [[rust-analyzer.semanticHighlighting.punctuation.enable]]rust-analyzer.semanticHighlighting.punctuation.enable (default: `false`)::
642 +
643 --
644 Use semantic tokens for punctuations.
645
646 When disabled, rust-analyzer will emit semantic tokens only for punctuation tokens when
647 they are tagged with modifiers or have a special role.
648 --
649 [[rust-analyzer.semanticHighlighting.punctuation.separate.macro.bang]]rust-analyzer.semanticHighlighting.punctuation.separate.macro.bang (default: `false`)::
650 +
651 --
652 When enabled, rust-analyzer will emit a punctuation semantic token for the `!` of macro
653 calls.
654 --
655 [[rust-analyzer.semanticHighlighting.punctuation.specialization.enable]]rust-analyzer.semanticHighlighting.punctuation.specialization.enable (default: `false`)::
656 +
657 --
658 Use specialized semantic tokens for punctuations.
659
660 When enabled, rust-analyzer will emit special token types for punctuation tokens instead
661 of the generic `punctuation` token type.
662 --
663 [[rust-analyzer.semanticHighlighting.strings.enable]]rust-analyzer.semanticHighlighting.strings.enable (default: `true`)::
664 +
665 --
666 Use semantic tokens for strings.
667
668 In some editors (e.g. vscode) semantic tokens override other highlighting grammars.
669 By disabling semantic tokens for strings, other grammars can be used to highlight
670 their contents.
671 --
672 [[rust-analyzer.signatureInfo.detail]]rust-analyzer.signatureInfo.detail (default: `"full"`)::
673 +
674 --
675 Show full signature of the callable. Only shows parameters if disabled.
676 --
677 [[rust-analyzer.signatureInfo.documentation.enable]]rust-analyzer.signatureInfo.documentation.enable (default: `true`)::
678 +
679 --
680 Show documentation.
681 --
682 [[rust-analyzer.typing.autoClosingAngleBrackets.enable]]rust-analyzer.typing.autoClosingAngleBrackets.enable (default: `false`)::
683 +
684 --
685 Whether to insert closing angle brackets when typing an opening angle bracket of a generic argument list.
686 --
687 [[rust-analyzer.workspace.symbol.search.kind]]rust-analyzer.workspace.symbol.search.kind (default: `"only_types"`)::
688 +
689 --
690 Workspace symbol search kind.
691 --
692 [[rust-analyzer.workspace.symbol.search.limit]]rust-analyzer.workspace.symbol.search.limit (default: `128`)::
693 +
694 --
695 Limits the number of items returned from a workspace symbol search (Defaults to 128).
696 Some clients like vs-code issue new searches on result filtering and don't require all results to be returned in the initial search.
697 Other clients requires all results upfront and might require a higher limit.
698 --
699 [[rust-analyzer.workspace.symbol.search.scope]]rust-analyzer.workspace.symbol.search.scope (default: `"workspace"`)::
700 +
701 --
702 Workspace symbol search scope.
703 --