]> git.lizzy.rs Git - rust.git/blob - docs/user/generated_config.adoc
Fix incorrect setting descriptions
[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 [following order](https://rust-analyzer.github.io/manual.html#auto-import). Groups are separated by newlines.
20 --
21 [[rust-analyzer.callInfo.full]]rust-analyzer.callInfo.full (default: `true`)::
22 +
23 --
24 Show function name and docs in parameter hints.
25 --
26 [[rust-analyzer.cargo.autoreload]]rust-analyzer.cargo.autoreload (default: `true`)::
27 +
28 --
29 Automatically refresh project info via `cargo metadata` on
30 `Cargo.toml` changes.
31 --
32 [[rust-analyzer.cargo.allFeatures]]rust-analyzer.cargo.allFeatures (default: `false`)::
33 +
34 --
35 Activate all available features (`--all-features`).
36 --
37 [[rust-analyzer.cargo.features]]rust-analyzer.cargo.features (default: `[]`)::
38 +
39 --
40 List of features to activate.
41 --
42 [[rust-analyzer.cargo.runBuildScripts]]rust-analyzer.cargo.runBuildScripts (default: `true`)::
43 +
44 --
45 Run build scripts (`build.rs`) for more precise code analysis.
46 --
47 [[rust-analyzer.cargo.useRustcWrapperForBuildScripts]]rust-analyzer.cargo.useRustcWrapperForBuildScripts (default: `true`)::
48 +
49 --
50 Use `RUSTC_WRAPPER=rust-analyzer` when running build scripts to
51 avoid compiling unnecessary things.
52 --
53 [[rust-analyzer.cargo.noDefaultFeatures]]rust-analyzer.cargo.noDefaultFeatures (default: `false`)::
54 +
55 --
56 Do not activate the `default` feature.
57 --
58 [[rust-analyzer.cargo.target]]rust-analyzer.cargo.target (default: `null`)::
59 +
60 --
61 Compilation target (target triple).
62 --
63 [[rust-analyzer.cargo.noSysroot]]rust-analyzer.cargo.noSysroot (default: `false`)::
64 +
65 --
66 Internal config for debugging, disables loading of sysroot crates.
67 --
68 [[rust-analyzer.checkOnSave.enable]]rust-analyzer.checkOnSave.enable (default: `true`)::
69 +
70 --
71 Run specified `cargo check` command for diagnostics on save.
72 --
73 [[rust-analyzer.checkOnSave.allFeatures]]rust-analyzer.checkOnSave.allFeatures (default: `null`)::
74 +
75 --
76 Check with all features (`--all-features`).
77 Defaults to `#rust-analyzer.cargo.allFeatures#`.
78 --
79 [[rust-analyzer.checkOnSave.allTargets]]rust-analyzer.checkOnSave.allTargets (default: `true`)::
80 +
81 --
82 Check all targets and tests (`--all-targets`).
83 --
84 [[rust-analyzer.checkOnSave.command]]rust-analyzer.checkOnSave.command (default: `"check"`)::
85 +
86 --
87 Cargo command to use for `cargo check`.
88 --
89 [[rust-analyzer.checkOnSave.noDefaultFeatures]]rust-analyzer.checkOnSave.noDefaultFeatures (default: `null`)::
90 +
91 --
92 Do not activate the `default` feature.
93 --
94 [[rust-analyzer.checkOnSave.target]]rust-analyzer.checkOnSave.target (default: `null`)::
95 +
96 --
97 Check for a specific target. Defaults to
98 `#rust-analyzer.cargo.target#`.
99 --
100 [[rust-analyzer.checkOnSave.extraArgs]]rust-analyzer.checkOnSave.extraArgs (default: `[]`)::
101 +
102 --
103 Extra arguments for `cargo check`.
104 --
105 [[rust-analyzer.checkOnSave.features]]rust-analyzer.checkOnSave.features (default: `null`)::
106 +
107 --
108 List of features to activate. Defaults to
109 `#rust-analyzer.cargo.features#`.
110 --
111 [[rust-analyzer.checkOnSave.overrideCommand]]rust-analyzer.checkOnSave.overrideCommand (default: `null`)::
112 +
113 --
114 Advanced option, fully override the command rust-analyzer uses for
115 checking. The command should include `--message-format=json` or
116 similar option.
117 --
118 [[rust-analyzer.completion.addCallArgumentSnippets]]rust-analyzer.completion.addCallArgumentSnippets (default: `true`)::
119 +
120 --
121 Whether to add argument snippets when completing functions.
122 --
123 [[rust-analyzer.completion.addCallParenthesis]]rust-analyzer.completion.addCallParenthesis (default: `true`)::
124 +
125 --
126 Whether to add parenthesis when completing functions.
127 --
128 [[rust-analyzer.completion.postfix.enable]]rust-analyzer.completion.postfix.enable (default: `true`)::
129 +
130 --
131 Whether to show postfix snippets like `dbg`, `if`, `not`, etc.
132 --
133 [[rust-analyzer.completion.autoimport.enable]]rust-analyzer.completion.autoimport.enable (default: `true`)::
134 +
135 --
136 Toggles the additional completions that automatically add imports when completed.
137 Note that your client must specify the `additionalTextEdits` LSP client capability to truly have this feature enabled.
138 --
139 [[rust-analyzer.diagnostics.enable]]rust-analyzer.diagnostics.enable (default: `true`)::
140 +
141 --
142 Whether to show native rust-analyzer diagnostics.
143 --
144 [[rust-analyzer.diagnostics.enableExperimental]]rust-analyzer.diagnostics.enableExperimental (default: `true`)::
145 +
146 --
147 Whether to show experimental rust-analyzer diagnostics that might
148 have more false positives than usual.
149 --
150 [[rust-analyzer.diagnostics.disabled]]rust-analyzer.diagnostics.disabled (default: `[]`)::
151 +
152 --
153 List of rust-analyzer diagnostics to disable.
154 --
155 [[rust-analyzer.diagnostics.remapPrefix]]rust-analyzer.diagnostics.remapPrefix (default: `{}`)::
156 +
157 --
158 Map of prefixes to be substituted when parsing diagnostic file paths.
159 This should be the reverse mapping of what is passed to `rustc` as `--remap-path-prefix`.
160 --
161 [[rust-analyzer.diagnostics.warningsAsHint]]rust-analyzer.diagnostics.warningsAsHint (default: `[]`)::
162 +
163 --
164 List of warnings that should be displayed with hint severity.
165
166 The warnings will be indicated by faded text or three dots in code
167 and will not show up in the `Problems Panel`.
168 --
169 [[rust-analyzer.diagnostics.warningsAsInfo]]rust-analyzer.diagnostics.warningsAsInfo (default: `[]`)::
170 +
171 --
172 List of warnings that should be displayed with info severity.
173
174 The warnings will be indicated by a blue squiggly underline in code
175 and a blue icon in the `Problems Panel`.
176 --
177 [[rust-analyzer.files.watcher]]rust-analyzer.files.watcher (default: `"client"`)::
178 +
179 --
180 Controls file watching implementation.
181 --
182 [[rust-analyzer.files.excludeDirs]]rust-analyzer.files.excludeDirs (default: `[]`)::
183 +
184 --
185 These directories will be ignored by rust-analyzer.
186 --
187 [[rust-analyzer.highlighting.strings]]rust-analyzer.highlighting.strings (default: `true`)::
188 +
189 --
190 Use semantic tokens for strings.
191
192 In some editors (e.g. vscode) semantic tokens override other highlighting grammars.
193 By disabling semantic tokens for strings, other grammars can be used to highlight
194 their contents.
195 --
196 [[rust-analyzer.hoverActions.debug]]rust-analyzer.hoverActions.debug (default: `true`)::
197 +
198 --
199 Whether to show `Debug` action. Only applies when
200 `#rust-analyzer.hoverActions.enable#` is set.
201 --
202 [[rust-analyzer.hoverActions.enable]]rust-analyzer.hoverActions.enable (default: `true`)::
203 +
204 --
205 Whether to show HoverActions in Rust files.
206 --
207 [[rust-analyzer.hoverActions.gotoTypeDef]]rust-analyzer.hoverActions.gotoTypeDef (default: `true`)::
208 +
209 --
210 Whether to show `Go to Type Definition` action. Only applies when
211 `#rust-analyzer.hoverActions.enable#` is set.
212 --
213 [[rust-analyzer.hoverActions.implementations]]rust-analyzer.hoverActions.implementations (default: `true`)::
214 +
215 --
216 Whether to show `Implementations` action. Only applies when
217 `#rust-analyzer.hoverActions.enable#` is set.
218 --
219 [[rust-analyzer.hoverActions.run]]rust-analyzer.hoverActions.run (default: `true`)::
220 +
221 --
222 Whether to show `Run` action. Only applies when
223 `#rust-analyzer.hoverActions.enable#` is set.
224 --
225 [[rust-analyzer.hoverActions.linksInHover]]rust-analyzer.hoverActions.linksInHover (default: `true`)::
226 +
227 --
228 Use markdown syntax for links in hover.
229 --
230 [[rust-analyzer.inlayHints.chainingHints]]rust-analyzer.inlayHints.chainingHints (default: `true`)::
231 +
232 --
233 Whether to show inlay type hints for method chains.
234 --
235 [[rust-analyzer.inlayHints.maxLength]]rust-analyzer.inlayHints.maxLength (default: `25`)::
236 +
237 --
238 Maximum length for inlay hints. Set to null to have an unlimited length.
239 --
240 [[rust-analyzer.inlayHints.parameterHints]]rust-analyzer.inlayHints.parameterHints (default: `true`)::
241 +
242 --
243 Whether to show function parameter name inlay hints at the call
244 site.
245 --
246 [[rust-analyzer.inlayHints.typeHints]]rust-analyzer.inlayHints.typeHints (default: `true`)::
247 +
248 --
249 Whether to show inlay type hints for variables.
250 --
251 [[rust-analyzer.lens.debug]]rust-analyzer.lens.debug (default: `true`)::
252 +
253 --
254 Whether to show `Debug` lens. Only applies when
255 `#rust-analyzer.lens.enable#` is set.
256 --
257 [[rust-analyzer.lens.enable]]rust-analyzer.lens.enable (default: `true`)::
258 +
259 --
260 Whether to show CodeLens in Rust files.
261 --
262 [[rust-analyzer.lens.implementations]]rust-analyzer.lens.implementations (default: `true`)::
263 +
264 --
265 Whether to show `Implementations` lens. Only applies when
266 `#rust-analyzer.lens.enable#` is set.
267 --
268 [[rust-analyzer.lens.run]]rust-analyzer.lens.run (default: `true`)::
269 +
270 --
271 Whether to show `Run` lens. Only applies when
272 `#rust-analyzer.lens.enable#` is set.
273 --
274 [[rust-analyzer.lens.methodReferences]]rust-analyzer.lens.methodReferences (default: `false`)::
275 +
276 --
277 Whether to show `Method References` lens. Only applies when
278 `#rust-analyzer.lens.enable#` is set.
279 --
280 [[rust-analyzer.lens.references]]rust-analyzer.lens.references (default: `false`)::
281 +
282 --
283 Whether to show `References` lens. Only applies when
284 `#rust-analyzer.lens.enable#` is set.
285 --
286 [[rust-analyzer.linkedProjects]]rust-analyzer.linkedProjects (default: `[]`)::
287 +
288 --
289 Disable project auto-discovery in favor of explicitly specified set
290 of projects.
291
292 Elements must be paths pointing to `Cargo.toml`,
293 `rust-project.json`, or JSON objects in `rust-project.json` format.
294 --
295 [[rust-analyzer.lruCapacity]]rust-analyzer.lruCapacity (default: `null`)::
296 +
297 --
298 Number of syntax trees rust-analyzer keeps in memory. Defaults to 128.
299 --
300 [[rust-analyzer.notifications.cargoTomlNotFound]]rust-analyzer.notifications.cargoTomlNotFound (default: `true`)::
301 +
302 --
303 Whether to show `can't find Cargo.toml` error message.
304 --
305 [[rust-analyzer.procMacro.enable]]rust-analyzer.procMacro.enable (default: `true`)::
306 +
307 --
308 Enable support for procedural macros, implies `#rust-analyzer.cargo.runBuildScripts#`.
309 --
310 [[rust-analyzer.procMacro.server]]rust-analyzer.procMacro.server (default: `null`)::
311 +
312 --
313 Internal config, path to proc-macro server executable (typically,
314 this is rust-analyzer itself, but we override this in tests).
315 --
316 [[rust-analyzer.runnables.overrideCargo]]rust-analyzer.runnables.overrideCargo (default: `null`)::
317 +
318 --
319 Command to be executed instead of 'cargo' for runnables.
320 --
321 [[rust-analyzer.runnables.cargoExtraArgs]]rust-analyzer.runnables.cargoExtraArgs (default: `[]`)::
322 +
323 --
324 Additional arguments to be passed to cargo for runnables such as
325 tests or binaries. For example, it may be `--release`.
326 --
327 [[rust-analyzer.rustcSource]]rust-analyzer.rustcSource (default: `null`)::
328 +
329 --
330 Path to the Cargo.toml of the rust compiler workspace, for usage in rustc_private
331 projects, or "discover" to try to automatically find it.
332
333 Any project which uses rust-analyzer with the rustcPrivate
334 crates must set `[package.metadata.rust-analyzer] rustc_private=true` to use it.
335
336 This option is not reloaded automatically; you must restart rust-analyzer for it to take effect.
337 --
338 [[rust-analyzer.rustfmt.extraArgs]]rust-analyzer.rustfmt.extraArgs (default: `[]`)::
339 +
340 --
341 Additional arguments to `rustfmt`.
342 --
343 [[rust-analyzer.rustfmt.overrideCommand]]rust-analyzer.rustfmt.overrideCommand (default: `null`)::
344 +
345 --
346 Advanced option, fully override the command rust-analyzer uses for
347 formatting.
348 --
349 [[rust-analyzer.rustfmt.enableRangeFormatting]]rust-analyzer.rustfmt.enableRangeFormatting (default: `false`)::
350 +
351 --
352 Enables the use of rustfmt's unstable range formatting command for the
353 `textDocument/rangeFormatting` request. The rustfmt option is unstable and only
354 available on a nightly build.
355 --
356 [[rust-analyzer.workspace.symbol.search.scope]]rust-analyzer.workspace.symbol.search.scope (default: `"workspace"`)::
357 +
358 --
359 Workspace symbol search scope.
360 --
361 [[rust-analyzer.workspace.symbol.search.kind]]rust-analyzer.workspace.symbol.search.kind (default: `"only_types"`)::
362 +
363 --
364 Workspace symbol search kind.
365 --