aboutsummaryrefslogtreecommitdiff
path: root/docs/user
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-05-03 17:57:51 +0100
committerGitHub <[email protected]>2021-05-03 17:57:51 +0100
commita2349366b57d49dad7293ecd91620835236f980e (patch)
treee4fb8e3beff3c3a203821dda583fd5e988c361b7 /docs/user
parent2493e039f1d9997e14aece2441f937ae8c7c6730 (diff)
parent13e9fb73f9444e35c736ecc15546048c189e5a23 (diff)
Merge #8482
8482: Mention how to customize unsafe operation styles r=matklad a=danielzfranklin I was confused about how to do this, so I filed #8474. I apologize for initially filing this incorrectly and spamming people. Co-authored-by: Daniel Franklin <[email protected]>
Diffstat (limited to 'docs/user')
-rw-r--r--docs/user/manual.adoc35
1 files changed, 35 insertions, 0 deletions
diff --git a/docs/user/manual.adoc b/docs/user/manual.adoc
index 54195adb7..58722aaa3 100644
--- a/docs/user/manual.adoc
+++ b/docs/user/manual.adoc
@@ -611,6 +611,41 @@ For example, mutable bindings are underlined by default and you can override thi
611} 611}
612---- 612----
613 613
614Most 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`:
615
616[source,jsonc]
617----
618{
619 "editor.semanticTokenColorCustomizations": {
620 "rules": {
621 "operator.unsafe": "#ff6600",
622 "function.unsafe": "#ff6600"
623 "method.unsafe": "#ff6600"
624 }
625 },
626}
627----
628
629In 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:
630
631[source,jsonc]
632----
633{
634 "editor.semanticTokenColorCustomizations": {
635 "rules": {
636 "operator.unsafe": "#ff6600"
637 },
638 "[Ayu Light]": {
639 "rules": {
640 "operator.unsafe": "#572300"
641 }
642 }
643 },
644}
645----
646
647Make sure you include the brackets around the theme name. For example, use `"[Ayu Light]"` to customize the theme Ayu Light.
648
614==== Special `when` clause context for keybindings. 649==== Special `when` clause context for keybindings.
615You may use `inRustProject` context to configure keybindings for rust projects only. 650You may use `inRustProject` context to configure keybindings for rust projects only.
616For example: 651For example: