Skip to content

Mention how to customize unsafe operation styles #100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions manual.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,24 @@ For example, mutable bindings are underlined by default and you can override thi
}
----

Most themes don't have support for styling unsafe operations differently. You can fix this by specifying custom styles in your `settings.json`:

[source,jsonc]
----
"editor.semanticTokenColorCustomizations": {
"[Theme Name]": {
"rules": {
"operator.unsafe": "#ff6600",
"function.unsafe": "#ff6600"
"method.unsafe": "#ff6600"
}
}
},
}
----

Make sure you include the brackets around the theme name. For example, use "[Ayu Dark]" to customize the theme Ayu Dark.

==== Special `when` clause context for keybindings.
You may use `inRustProject` context to configure keybindings for rust projects only.
For example:
Expand Down