diff options
author | Daniel Franklin <[email protected]> | 2021-04-12 16:18:04 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-04-12 16:18:04 +0100 |
commit | 23429a08d5906a91f7801a8060bf142bb0203722 (patch) | |
tree | 86ae94a7b3be3ec8de689618f50435e9600a996d /docs/user | |
parent | 563d2d15b3aeedf4552066a18f4383d8b71ec635 (diff) |
Mention how to customize unsafe operation styles
I was confused about how to do this, so I filed [an issue][issue].
[issue]: rust-analyzer/rust-analyzer#8474
Diffstat (limited to 'docs/user')
-rw-r--r-- | docs/user/manual.adoc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/docs/user/manual.adoc b/docs/user/manual.adoc index e74b287fb..b9f29188c 100644 --- a/docs/user/manual.adoc +++ b/docs/user/manual.adoc | |||
@@ -589,6 +589,24 @@ 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`: | ||
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 | |||
592 | ==== Special `when` clause context for keybindings. | 610 | ==== Special `when` clause context for keybindings. |
593 | You may use `inRustProject` context to configure keybindings for rust projects only. | 611 | You may use `inRustProject` context to configure keybindings for rust projects only. |
594 | For example: | 612 | For example: |