]> git.lizzy.rs Git - rust.git/blob - docs/user/generated_config.adoc
Regen generated_config.adoc
[rust.git] / docs / user / generated_config.adoc
1 [[rust-analyzer.assist.importGranularity]]rust-analyzer.assist.importGranularity (default: `"crate"`)::
2 +
3 --
4 How imports should be grouped into use statements.
5 --
6 [[rust-analyzer.assist.importEnforceGranularity]]rust-analyzer.assist.importEnforceGranularity (default: `false`)::
7 +
8 --
9 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.
10 --
11 [[rust-analyzer.assist.importPrefix]]rust-analyzer.assist.importPrefix (default: `"plain"`)::
12 +
13 --
14 The path structure for newly inserted paths to use.
15 --
16 [[rust-analyzer.assist.importGroup]]rust-analyzer.assist.importGroup (default: `true`)::
17 +
18 --
19 Group inserted imports by the https://rust-analyzer.github.io/manual.html#auto-import[following order]. Groups are separated by newlines.
20 --
21 [[rust-analyzer.assist.allowMergingIntoGlobImports]]rust-analyzer.assist.allowMergingIntoGlobImports (default: `true`)::
22 +
23 --
24 Whether to allow import insertion to merge new imports into single path glob imports like `use std::fmt::*;`.
25 --
26 [[rust-analyzer.callInfo.full]]rust-analyzer.callInfo.full (default: `true`)::
27 +
28 --
29 Show function name and docs in parameter hints.
30 --
31 [[rust-analyzer.cargo.autoreload]]rust-analyzer.cargo.autoreload (default: `true`)::
32 +
33 --
34 Automatically refresh project info via `cargo metadata` on
35 `Cargo.toml` changes.
36 --
37 [[rust-analyzer.cargo.allFeatures]]rust-analyzer.cargo.allFeatures (default: `false`)::
38 +
39 --
40 Activate all available features (`--all-features`).
41 --
42 [[rust-analyzer.cargo.unsetTest]]rust-analyzer.cargo.unsetTest (default: `["core"]`)::
43 +
44 --
45 Unsets `#[cfg(test)]` for the specified crates.
46 --
47 [[rust-analyzer.cargo.features]]rust-analyzer.cargo.features (default: `[]`)::
48 +
49 --
50 List of features to activate.
51 --
52 [[rust-analyzer.cargo.runBuildScripts]]rust-analyzer.cargo.runBuildScripts (default: `true`)::
53 +
54 --
55 Run build scripts (`build.rs`) for more precise code analysis.
56 --
57 [[rust-analyzer.cargo.useRustcWrapperForBuildScripts]]rust-analyzer.cargo.useRustcWrapperForBuildScripts (default: `true`)::
58 +
59 --
60 Use `RUSTC_WRAPPER=rust-analyzer` when running build scripts to
61 avoid compiling unnecessary things.
62 --
63 [[rust-analyzer.cargo.noDefaultFeatures]]rust-analyzer.cargo.noDefaultFeatures (default: `false`)::
64 +
65 --
66 Do not activate the `default` feature.
67 --
68 [[rust-analyzer.cargo.target]]rust-analyzer.cargo.target (default: `null`)::
69 +
70 --
71 Compilation target (target triple).
72 --
73 [[rust-analyzer.cargo.noSysroot]]rust-analyzer.cargo.noSysroot (default: `false`)::
74 +
75 --
76 Internal config for debugging, disables loading of sysroot crates.
77 --
78 [[rust-analyzer.checkOnSave.enable]]rust-analyzer.checkOnSave.enable (default: `true`)::
79 +
80 --
81 Run specified `cargo check` command for diagnostics on save.
82 --
83 [[rust-analyzer.checkOnSave.allFeatures]]rust-analyzer.checkOnSave.allFeatures (default: `null`)::
84 +
85 --
86 Check with all features (`--all-features`).
87 Defaults to `#rust-analyzer.cargo.allFeatures#`.
88 --
89 [[rust-analyzer.checkOnSave.allTargets]]rust-analyzer.checkOnSave.allTargets (default: `true`)::
90 +
91 --
92 Check all targets and tests (`--all-targets`).
93 --
94 [[rust-analyzer.checkOnSave.command]]rust-analyzer.checkOnSave.command (default: `"check"`)::
95 +
96 --
97 Cargo command to use for `cargo check`.
98 --
99 [[rust-analyzer.checkOnSave.noDefaultFeatures]]rust-analyzer.checkOnSave.noDefaultFeatures (default: `null`)::
100 +
101 --
102 Do not activate the `default` feature.
103 --
104 [[rust-analyzer.checkOnSave.target]]rust-analyzer.checkOnSave.target (default: `null`)::
105 +
106 --
107 Check for a specific target. Defaults to
108 `#rust-analyzer.cargo.target#`.
109 --
110 [[rust-analyzer.checkOnSave.extraArgs]]rust-analyzer.checkOnSave.extraArgs (default: `[]`)::
111 +
112 --
113 Extra arguments for `cargo check`.
114 --
115 [[rust-analyzer.checkOnSave.features]]rust-analyzer.checkOnSave.features (default: `null`)::
116 +
117 --
118 List of features to activate. Defaults to
119 `#rust-analyzer.cargo.features#`.
120 --
121 [[rust-analyzer.checkOnSave.overrideCommand]]rust-analyzer.checkOnSave.overrideCommand (default: `null`)::
122 +
123 --
124 Advanced option, fully override the command rust-analyzer uses for
125 checking. The command should include `--message-format=json` or
126 similar option.
127 --
128 [[rust-analyzer.completion.addCallArgumentSnippets]]rust-analyzer.completion.addCallArgumentSnippets (default: `true`)::
129 +
130 --
131 Whether to add argument snippets when completing functions.
132 Only applies when `#rust-analyzer.completion.addCallParenthesis#` is set.
133 --
134 [[rust-analyzer.completion.addCallParenthesis]]rust-analyzer.completion.addCallParenthesis (default: `true`)::
135 +
136 --
137 Whether to add parenthesis when completing functions.
138 --
139 [[rust-analyzer.completion.snippets]]rust-analyzer.completion.snippets (default: `{}`)::
140 +
141 --
142 Custom completion snippets.
143 --
144 [[rust-analyzer.completion.postfix.enable]]rust-analyzer.completion.postfix.enable (default: `true`)::
145 +
146 --
147 Whether to show postfix snippets like `dbg`, `if`, `not`, etc.
148 --
149 [[rust-analyzer.completion.postfix.snippets]]rust-analyzer.completion.postfix.snippets (default: `{}`)::
150 +
151 --
152 Custom postfix completion snippets.
153 --
154 [[rust-analyzer.completion.autoimport.enable]]rust-analyzer.completion.autoimport.enable (default: `true`)::
155 +
156 --
157 Toggles the additional completions that automatically add imports when completed.
158 Note that your client must specify the `additionalTextEdits` LSP client capability to truly have this feature enabled.
159 --
160 [[rust-analyzer.completion.autoself.enable]]rust-analyzer.completion.autoself.enable (default: `true`)::
161 +
162 --
163 Toggles the additional completions that automatically show method calls and field accesses
164 with `self` prefixed to them when inside a method.
165 --
166 [[rust-analyzer.diagnostics.enable]]rust-analyzer.diagnostics.enable (default: `true`)::
167 +
168 --
169 Whether to show native rust-analyzer diagnostics.
170 --
171 [[rust-analyzer.diagnostics.enableExperimental]]rust-analyzer.diagnostics.enableExperimental (default: `true`)::
172 +
173 --
174 Whether to show experimental rust-analyzer diagnostics that might
175 have more false positives than usual.
176 --
177 [[rust-analyzer.diagnostics.disabled]]rust-analyzer.diagnostics.disabled (default: `[]`)::
178 +
179 --
180 List of rust-analyzer diagnostics to disable.
181 --
182 [[rust-analyzer.diagnostics.remapPrefix]]rust-analyzer.diagnostics.remapPrefix (default: `{}`)::
183 +
184 --
185 Map of prefixes to be substituted when parsing diagnostic file paths.
186 This should be the reverse mapping of what is passed to `rustc` as `--remap-path-prefix`.
187 --
188 [[rust-analyzer.diagnostics.warningsAsHint]]rust-analyzer.diagnostics.warningsAsHint (default: `[]`)::
189 +
190 --
191 List of warnings that should be displayed with hint severity.
192
193 The warnings will be indicated by faded text or three dots in code
194 and will not show up in the `Problems Panel`.
195 --
196 [[rust-analyzer.diagnostics.warningsAsInfo]]rust-analyzer.diagnostics.warningsAsInfo (default: `[]`)::
197 +
198 --
199 List of warnings that should be displayed with info severity.
200
201 The warnings will be indicated by a blue squiggly underline in code
202 and a blue icon in the `Problems Panel`.
203 --
204 [[rust-analyzer.experimental.procAttrMacros]]rust-analyzer.experimental.procAttrMacros (default: `true`)::
205 +
206 --
207 Expand attribute macros.
208 --
209 [[rust-analyzer.files.watcher]]rust-analyzer.files.watcher (default: `"client"`)::
210 +
211 --
212 Controls file watching implementation.
213 --
214 [[rust-analyzer.files.excludeDirs]]rust-analyzer.files.excludeDirs (default: `[]`)::
215 +
216 --
217 These directories will be ignored by rust-analyzer. They are
218 relative to the workspace root, and globs are not supported. You may
219 also need to add the folders to Code's `files.watcherExclude`.
220 --
221 [[rust-analyzer.highlightRelated.references]]rust-analyzer.highlightRelated.references (default: `true`)::
222 +
223 --
224 Enables highlighting of related references while hovering your mouse above any identifier.
225 --
226 [[rust-analyzer.highlightRelated.exitPoints]]rust-analyzer.highlightRelated.exitPoints (default: `true`)::
227 +
228 --
229 Enables highlighting of all exit points while hovering your mouse above any `return`, `?`, or return type arrow (`->`).
230 --
231 [[rust-analyzer.highlightRelated.breakPoints]]rust-analyzer.highlightRelated.breakPoints (default: `true`)::
232 +
233 --
234 Enables highlighting of related references while hovering your mouse `break`, `loop`, `while`, or `for` keywords.
235 --
236 [[rust-analyzer.highlightRelated.yieldPoints]]rust-analyzer.highlightRelated.yieldPoints (default: `true`)::
237 +
238 --
239 Enables highlighting of all break points for a loop or block context while hovering your mouse above any `async` or `await` keywords.
240 --
241 [[rust-analyzer.highlighting.strings]]rust-analyzer.highlighting.strings (default: `true`)::
242 +
243 --
244 Use semantic tokens for strings.
245
246 In some editors (e.g. vscode) semantic tokens override other highlighting grammars.
247 By disabling semantic tokens for strings, other grammars can be used to highlight
248 their contents.
249 --
250 [[rust-analyzer.hover.documentation]]rust-analyzer.hover.documentation (default: `true`)::
251 +
252 --
253 Whether to show documentation on hover.
254 --
255 [[rust-analyzer.hover.linksInHover]]rust-analyzer.hover.linksInHover (default: `true`)::
256 +
257 --
258 Use markdown syntax for links in hover.
259 --
260 [[rust-analyzer.hoverActions.debug]]rust-analyzer.hoverActions.debug (default: `true`)::
261 +
262 --
263 Whether to show `Debug` action. Only applies when
264 `#rust-analyzer.hoverActions.enable#` is set.
265 --
266 [[rust-analyzer.hoverActions.enable]]rust-analyzer.hoverActions.enable (default: `true`)::
267 +
268 --
269 Whether to show HoverActions in Rust files.
270 --
271 [[rust-analyzer.hoverActions.gotoTypeDef]]rust-analyzer.hoverActions.gotoTypeDef (default: `true`)::
272 +
273 --
274 Whether to show `Go to Type Definition` action. Only applies when
275 `#rust-analyzer.hoverActions.enable#` is set.
276 --
277 [[rust-analyzer.hoverActions.implementations]]rust-analyzer.hoverActions.implementations (default: `true`)::
278 +
279 --
280 Whether to show `Implementations` action. Only applies when
281 `#rust-analyzer.hoverActions.enable#` is set.
282 --
283 [[rust-analyzer.hoverActions.references]]rust-analyzer.hoverActions.references (default: `false`)::
284 +
285 --
286 Whether to show `References` action. Only applies when
287 `#rust-analyzer.hoverActions.enable#` is set.
288 --
289 [[rust-analyzer.hoverActions.run]]rust-analyzer.hoverActions.run (default: `true`)::
290 +
291 --
292 Whether to show `Run` action. Only applies when
293 `#rust-analyzer.hoverActions.enable#` is set.
294 --
295 [[rust-analyzer.inlayHints.chainingHints]]rust-analyzer.inlayHints.chainingHints (default: `true`)::
296 +
297 --
298 Whether to show inlay type hints for method chains.
299 --
300 [[rust-analyzer.inlayHints.maxLength]]rust-analyzer.inlayHints.maxLength (default: `25`)::
301 +
302 --
303 Maximum length for inlay hints. Set to null to have an unlimited length.
304 --
305 [[rust-analyzer.inlayHints.parameterHints]]rust-analyzer.inlayHints.parameterHints (default: `true`)::
306 +
307 --
308 Whether to show function parameter name inlay hints at the call
309 site.
310 --
311 [[rust-analyzer.inlayHints.typeHints]]rust-analyzer.inlayHints.typeHints (default: `true`)::
312 +
313 --
314 Whether to show inlay type hints for variables.
315 --
316 [[rust-analyzer.joinLines.joinElseIf]]rust-analyzer.joinLines.joinElseIf (default: `true`)::
317 +
318 --
319 Join lines inserts else between consecutive ifs.
320 --
321 [[rust-analyzer.joinLines.removeTrailingComma]]rust-analyzer.joinLines.removeTrailingComma (default: `true`)::
322 +
323 --
324 Join lines removes trailing commas.
325 --
326 [[rust-analyzer.joinLines.unwrapTrivialBlock]]rust-analyzer.joinLines.unwrapTrivialBlock (default: `true`)::
327 +
328 --
329 Join lines unwraps trivial blocks.
330 --
331 [[rust-analyzer.joinLines.joinAssignments]]rust-analyzer.joinLines.joinAssignments (default: `true`)::
332 +
333 --
334 Join lines merges consecutive declaration and initialization of an assignment.
335 --
336 [[rust-analyzer.lens.debug]]rust-analyzer.lens.debug (default: `true`)::
337 +
338 --
339 Whether to show `Debug` lens. Only applies when
340 `#rust-analyzer.lens.enable#` is set.
341 --
342 [[rust-analyzer.lens.enable]]rust-analyzer.lens.enable (default: `true`)::
343 +
344 --
345 Whether to show CodeLens in Rust files.
346 --
347 [[rust-analyzer.lens.implementations]]rust-analyzer.lens.implementations (default: `true`)::
348 +
349 --
350 Whether to show `Implementations` lens. Only applies when
351 `#rust-analyzer.lens.enable#` is set.
352 --
353 [[rust-analyzer.lens.run]]rust-analyzer.lens.run (default: `true`)::
354 +
355 --
356 Whether to show `Run` lens. Only applies when
357 `#rust-analyzer.lens.enable#` is set.
358 --
359 [[rust-analyzer.lens.methodReferences]]rust-analyzer.lens.methodReferences (default: `false`)::
360 +
361 --
362 Whether to show `Method References` lens. Only applies when
363 `#rust-analyzer.lens.enable#` is set.
364 --
365 [[rust-analyzer.lens.references]]rust-analyzer.lens.references (default: `false`)::
366 +
367 --
368 Whether to show `References` lens. Only applies when
369 `#rust-analyzer.lens.enable#` is set.
370 --
371 [[rust-analyzer.lens.forceCustomCommands]]rust-analyzer.lens.forceCustomCommands (default: `true`)::
372 +
373 --
374 Internal config: use custom client-side commands even when the
375 client doesn't set the corresponding capability.
376 --
377 [[rust-analyzer.linkedProjects]]rust-analyzer.linkedProjects (default: `[]`)::
378 +
379 --
380 Disable project auto-discovery in favor of explicitly specified set
381 of projects.
382
383 Elements must be paths pointing to `Cargo.toml`,
384 `rust-project.json`, or JSON objects in `rust-project.json` format.
385 --
386 [[rust-analyzer.lruCapacity]]rust-analyzer.lruCapacity (default: `null`)::
387 +
388 --
389 Number of syntax trees rust-analyzer keeps in memory. Defaults to 128.
390 --
391 [[rust-analyzer.notifications.cargoTomlNotFound]]rust-analyzer.notifications.cargoTomlNotFound (default: `true`)::
392 +
393 --
394 Whether to show `can't find Cargo.toml` error message.
395 --
396 [[rust-analyzer.procMacro.enable]]rust-analyzer.procMacro.enable (default: `true`)::
397 +
398 --
399 Enable support for procedural macros, implies `#rust-analyzer.cargo.runBuildScripts#`.
400 --
401 [[rust-analyzer.procMacro.server]]rust-analyzer.procMacro.server (default: `null`)::
402 +
403 --
404 Internal config, path to proc-macro server executable (typically,
405 this is rust-analyzer itself, but we override this in tests).
406 --
407 [[rust-analyzer.runnables.overrideCargo]]rust-analyzer.runnables.overrideCargo (default: `null`)::
408 +
409 --
410 Command to be executed instead of 'cargo' for runnables.
411 --
412 [[rust-analyzer.runnables.cargoExtraArgs]]rust-analyzer.runnables.cargoExtraArgs (default: `[]`)::
413 +
414 --
415 Additional arguments to be passed to cargo for runnables such as
416 tests or binaries. For example, it may be `--release`.
417 --
418 [[rust-analyzer.rustcSource]]rust-analyzer.rustcSource (default: `null`)::
419 +
420 --
421 Path to the Cargo.toml of the rust compiler workspace, for usage in rustc_private
422 projects, or "discover" to try to automatically find it.
423
424 Any project which uses rust-analyzer with the rustcPrivate
425 crates must set `[package.metadata.rust-analyzer] rustc_private=true` to use it.
426
427 This option is not reloaded automatically; you must restart rust-analyzer for it to take effect.
428 --
429 [[rust-analyzer.rustfmt.extraArgs]]rust-analyzer.rustfmt.extraArgs (default: `[]`)::
430 +
431 --
432 Additional arguments to `rustfmt`.
433 --
434 [[rust-analyzer.rustfmt.overrideCommand]]rust-analyzer.rustfmt.overrideCommand (default: `null`)::
435 +
436 --
437 Advanced option, fully override the command rust-analyzer uses for
438 formatting.
439 --
440 [[rust-analyzer.rustfmt.enableRangeFormatting]]rust-analyzer.rustfmt.enableRangeFormatting (default: `false`)::
441 +
442 --
443 Enables the use of rustfmt's unstable range formatting command for the
444 `textDocument/rangeFormatting` request. The rustfmt option is unstable and only
445 available on a nightly build.
446 --
447 [[rust-analyzer.workspace.symbol.search.scope]]rust-analyzer.workspace.symbol.search.scope (default: `"workspace"`)::
448 +
449 --
450 Workspace symbol search scope.
451 --
452 [[rust-analyzer.workspace.symbol.search.kind]]rust-analyzer.workspace.symbol.search.kind (default: `"only_types"`)::
453 +
454 --
455 Workspace symbol search kind.
456 --