Skip to content

Commit 13e9fb7

Browse files
authored
Merge with semantic style section
1 parent 23429a0 commit 13e9fb7

File tree

1 file changed

+25
-8
lines changed

1 file changed

+25
-8
lines changed

docs/user/manual.adoc

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -589,23 +589,40 @@ 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`:
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`:
593593

594594
[source,jsonc]
595595
----
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]": {
598617
"rules": {
599-
"operator.unsafe": "#ff6600",
600-
"function.unsafe": "#ff6600"
601-
"method.unsafe": "#ff6600"
618+
"operator.unsafe": "#572300"
602619
}
603-
}
620+
}
604621
},
605622
}
606623
----
607624

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.
609626

610627
==== Special `when` clause context for keybindings.
611628
You may use `inRustProject` context to configure keybindings for rust projects only.

0 commit comments

Comments
 (0)