aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-08-26 14:07:06 +0100
committerGitHub <[email protected]>2020-08-26 14:07:06 +0100
commitd58a3a277a1778ec33e492e958b52869510c1239 (patch)
tree101d27b02d5671aa6bd9f242be26281f13350f6c /docs
parentad60b4e6ea1cbbb4c611f56833af90b43c4a5a3e (diff)
parent5b9a882edc20810641cb774240e5089e87dab82e (diff)
Merge #5885
5885: Make inlay hints colors more configurable r=matklad a=Veetaha **[BREAKING CHANGE]** Tackles https://github.com/rust-analyzer/rust-analyzer/issues/5337#issuecomment-680018601 and generally related to #5337. Added `foreground/background` color configurations with optional more specific overrides `foreground.(type|parameter|chaining)Hints`. One problem I see is that the config keys are long and don't fit into the on-hover hints in the `settings.json` file entirely... <details> <summary>Demo</summary> ![demo](https://user-images.githubusercontent.com/36276403/91238334-77fc3b00-e745-11ea-836b-2822015ece98.gif) </details> Co-authored-by: Veetaha <[email protected]>
Diffstat (limited to 'docs')
-rw-r--r--docs/user/manual.adoc24
1 files changed, 24 insertions, 0 deletions
diff --git a/docs/user/manual.adoc b/docs/user/manual.adoc
index 8c966288b..b15c9ee7f 100644
--- a/docs/user/manual.adoc
+++ b/docs/user/manual.adoc
@@ -367,6 +367,30 @@ include::./generated_assists.adoc[]
367 367
368== Editor Features 368== Editor Features
369=== VS Code 369=== VS Code
370
371==== Color configurations
372
373It 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
370==== Special `when` clause context for keybindings. 394==== Special `when` clause context for keybindings.
371You may use `inRustProject` context to configure keybindings for rust projects only. For example: 395You may use `inRustProject` context to configure keybindings for rust projects only. For example:
372[source,json] 396[source,json]