aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Franklin <[email protected]>2021-04-12 16:18:04 +0100
committerGitHub <[email protected]>2021-04-12 16:18:04 +0100
commit23429a08d5906a91f7801a8060bf142bb0203722 (patch)
tree86ae94a7b3be3ec8de689618f50435e9600a996d
parent563d2d15b3aeedf4552066a18f4383d8b71ec635 (diff)
Mention how to customize unsafe operation styles
I was confused about how to do this, so I filed [an issue][issue]. [issue]: rust-analyzer/rust-analyzer#8474
-rw-r--r--docs/user/manual.adoc18
1 files changed, 18 insertions, 0 deletions
diff --git a/docs/user/manual.adoc b/docs/user/manual.adoc
index e74b287fb..b9f29188c 100644
--- a/docs/user/manual.adoc
+++ b/docs/user/manual.adoc
@@ -589,6 +589,24 @@ For example, mutable bindings are underlined by default and you can override thi
589} 589}
590---- 590----
591 591
592Most themes don't have support for styling unsafe operations differently. You can fix this by specifying custom styles in your `settings.json`:
593
594[source,jsonc]
595----
596"editor.semanticTokenColorCustomizations": {
597 "[Theme Name]": {
598 "rules": {
599 "operator.unsafe": "#ff6600",
600 "function.unsafe": "#ff6600"
601 "method.unsafe": "#ff6600"
602 }
603 }
604 },
605}
606----
607
608Make sure you include the brackets around the theme name. For example, use "[Ayu Dark]" to customize the theme Ayu Dark.
609
592==== Special `when` clause context for keybindings. 610==== Special `when` clause context for keybindings.
593You may use `inRustProject` context to configure keybindings for rust projects only. 611You may use `inRustProject` context to configure keybindings for rust projects only.
594For example: 612For example: