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