diff options
Diffstat (limited to 'docs/user')
-rw-r--r-- | docs/user/manual.adoc | 42 |
1 files changed, 38 insertions, 4 deletions
diff --git a/docs/user/manual.adoc b/docs/user/manual.adoc index bebcee023..b15c9ee7f 100644 --- a/docs/user/manual.adoc +++ b/docs/user/manual.adoc | |||
@@ -273,9 +273,19 @@ However, if you use some other build system, you'll have to describe the structu | |||
273 | [source,TypeScript] | 273 | [source,TypeScript] |
274 | ---- | 274 | ---- |
275 | interface JsonProject { | 275 | interface JsonProject { |
276 | /// The set of crates comprising the current project. | 276 | /// Path to the directory with *source code* of sysroot crates. |
277 | /// Must include all transitive dependencies as well as sysroot crate (libstd, libcore and such). | 277 | /// |
278 | crates: Crate[]; | 278 | /// It should point to the directory where std, core, and friends can be found: |
279 | /// https://github.com/rust-lang/rust/tree/master/library. | ||
280 | /// | ||
281 | /// If provided, rust-analyzer automatically adds dependencies on sysroot | ||
282 | /// crates. Conversely, if you omit this path, you can specify sysroot | ||
283 | /// dependencies yourself and, for example, have several different "sysroots" in | ||
284 | /// one graph of crates. | ||
285 | sysroot_src?: string; | ||
286 | /// The set of crates comprising the current project. | ||
287 | /// Must include all transitive dependencies as well as sysroot crate (libstd, libcore and such). | ||
288 | crates: Crate[]; | ||
279 | } | 289 | } |
280 | 290 | ||
281 | interface Crate { | 291 | interface Crate { |
@@ -341,7 +351,7 @@ Relative paths are interpreted relative to `rust-project.json` file location or | |||
341 | 351 | ||
342 | See https://github.com/rust-analyzer/rust-project.json-example for a small example. | 352 | See https://github.com/rust-analyzer/rust-project.json-example for a small example. |
343 | 353 | ||
344 | You can set `RA_LOG` environmental variable to `"'rust_analyzer=info"` to inspect how rust-analyzer handles config and project loading. | 354 | You can set `RA_LOG` environmental variable to `rust_analyzer=info` to inspect how rust-analyzer handles config and project loading. |
345 | 355 | ||
346 | == Features | 356 | == Features |
347 | 357 | ||
@@ -357,6 +367,30 @@ include::./generated_assists.adoc[] | |||
357 | 367 | ||
358 | == Editor Features | 368 | == Editor Features |
359 | === VS Code | 369 | === VS Code |
370 | |||
371 | ==== Color configurations | ||
372 | |||
373 | It is possible to change the foreground/background color of inlay hints. Just add this to your | ||
374 | `settings.json`: | ||
375 | |||
376 | [source,jsonc] | ||
377 | ---- | ||
378 | { | ||
379 | "workbench.colorCustomizations": { | ||
380 | // Name of the theme you are currently using | ||
381 | "[Default Dark+]": { | ||
382 | "rust_analyzer.inlayHints.foreground": "#868686f0", | ||
383 | "rust_analyzer.inlayHints.background": "#3d3d3d48", | ||
384 | |||
385 | // Overrides for specific kinds of inlay hints | ||
386 | "rust_analyzer.inlayHints.foreground.typeHints": "#fdb6fdf0", | ||
387 | "rust_analyzer.inlayHints.foreground.paramHints": "#fdb6fdf0", | ||
388 | "rust_analyzer.inlayHints.background.chainingHints": "#6b0c0c81" | ||
389 | } | ||
390 | } | ||
391 | } | ||
392 | ---- | ||
393 | |||
360 | ==== Special `when` clause context for keybindings. | 394 | ==== Special `when` clause context for keybindings. |
361 | You may use `inRustProject` context to configure keybindings for rust projects only. For example: | 395 | You may use `inRustProject` context to configure keybindings for rust projects only. For example: |
362 | [source,json] | 396 | [source,json] |