You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/user/manual.adoc
+25-8Lines changed: 25 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -589,23 +589,40 @@ For example, mutable bindings are underlined by default and you can override thi
589
589
}
590
590
----
591
591
592
-
Most themes don't have support for styling unsafe operations differently. You can fix this by specifying custom styles in your `settings.json`:
592
+
Most themes doesn't support styling unsafe operations differently yet. You can fix this by adding overrides for the rules `operator.unsafe`, `function.unsafe`, and `method.unsafe`:
593
593
594
594
[source,jsonc]
595
595
----
596
-
"editor.semanticTokenColorCustomizations": {
597
-
"[Theme Name]": {
596
+
{
597
+
"editor.semanticTokenColorCustomizations": {
598
+
"rules": {
599
+
"operator.unsafe": "#ff6600",
600
+
"function.unsafe": "#ff6600"
601
+
"method.unsafe": "#ff6600"
602
+
}
603
+
},
604
+
}
605
+
----
606
+
607
+
In addition to the top-level rules you can specify overrides for specific themes. For example, if you wanted to use a darker text color on a specific light theme, you might write:
608
+
609
+
[source,jsonc]
610
+
----
611
+
{
612
+
"editor.semanticTokenColorCustomizations": {
613
+
"rules": {
614
+
"operator.unsafe": "#ff6600"
615
+
},
616
+
"[Ayu Light]": {
598
617
"rules": {
599
-
"operator.unsafe": "#ff6600",
600
-
"function.unsafe": "#ff6600"
601
-
"method.unsafe": "#ff6600"
618
+
"operator.unsafe": "#572300"
602
619
}
603
-
}
620
+
}
604
621
},
605
622
}
606
623
----
607
624
608
-
Make sure you include the brackets around the theme name. For example, use "[Ayu Dark]" to customize the theme Ayu Dark.
625
+
Make sure you include the brackets around the theme name. For example, use `"[Ayu Light]"` to customize the theme Ayu Light.
609
626
610
627
==== Special `when` clause context for keybindings.
611
628
You may use `inRustProject` context to configure keybindings for rust projects only.
0 commit comments