Skip to content

Update manual for inlay hint customization #11708

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

Merged
merged 1 commit into from
Mar 15, 2022
Merged
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
14 changes: 8 additions & 6 deletions docs/user/manual.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -714,22 +714,24 @@ include::./generated_diagnostic.adoc[]

==== Color configurations

It is possible to change the foreground/background color of inlay hints.
It is possible to change the foreground/background color and font family/size of inlay hints.
Just add this to your `settings.json`:

[source,jsonc]
----
{
"editor.inlayHints.fontFamily": "Courier New",
"editor.inlayHints.fontSize": 11,

"workbench.colorCustomizations": {
// Name of the theme you are currently using
"[Default Dark+]": {
"rust_analyzer.inlayHints.foreground": "#868686f0",
"rust_analyzer.inlayHints.background": "#3d3d3d48",
"editorInlayHint.foreground": "#868686f0",
"editorInlayHint.background": "#3d3d3d48",

// Overrides for specific kinds of inlay hints
"rust_analyzer.inlayHints.foreground.typeHints": "#fdb6fdf0",
"rust_analyzer.inlayHints.foreground.paramHints": "#fdb6fdf0",
"rust_analyzer.inlayHints.background.chainingHints": "#6b0c0c81"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can tell, there is no equivalent for the chainingHints color available in VScode settings yet – they just use the base editorInlayHint.* colors.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ye the proposal only defines type and parameter hints, everything else will fall back to the general

"editorInlayHint.typeForeground": "#fdb6fdf0",
"editorInlayHint.parameterForeground": "#fdb6fdf0",
}
}
}
Expand Down