diff options
author | Daniel Franklin <[email protected]> | 2021-05-03 17:54:09 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-05-03 17:54:09 +0100 |
commit | 13e9fb73f9444e35c736ecc15546048c189e5a23 (patch) | |
tree | 0ac40478fe78c31b7ec153c00e1d3c99c50162cd /docs/user | |
parent | 23429a08d5906a91f7801a8060bf142bb0203722 (diff) |
Merge with semantic style section
Diffstat (limited to 'docs/user')
-rw-r--r-- | docs/user/manual.adoc | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/docs/user/manual.adoc b/docs/user/manual.adoc index b9f29188c..7510736e9 100644 --- a/docs/user/manual.adoc +++ b/docs/user/manual.adoc | |||
@@ -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 | [source,jsonc] | 594 | [source,jsonc] |
595 | ---- | 595 | ---- |
596 | "editor.semanticTokenColorCustomizations": { | 596 | { |
597 | "[Theme Name]": { | 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 | "rules": { | 617 | "rules": { |
599 | "operator.unsafe": "#ff6600", | 618 | "operator.unsafe": "#572300" |
600 | "function.unsafe": "#ff6600" | ||
601 | "method.unsafe": "#ff6600" | ||
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 | ==== Special `when` clause context for keybindings. | 627 | ==== Special `when` clause context for keybindings. |
611 | You may use `inRustProject` context to configure keybindings for rust projects only. | 628 | You may use `inRustProject` context to configure keybindings for rust projects only. |