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