Skip to content

Commit 23429a0

Browse files
authored
Mention how to customize unsafe operation styles
I was confused about how to do this, so I filed [an issue][issue]. [issue]: #8474
1 parent 563d2d1 commit 23429a0

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

docs/user/manual.adoc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,24 @@ For example, mutable bindings are underlined by default and you can override thi
589589
}
590590
----
591591

592+
Most 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+
608+
Make sure you include the brackets around the theme name. For example, use "[Ayu Dark]" to customize the theme Ayu Dark.
609+
592610
==== Special `when` clause context for keybindings.
593611
You may use `inRustProject` context to configure keybindings for rust projects only.
594612
For example:

0 commit comments

Comments
 (0)