-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Is there a setting to change the color of inlay hints? #4334
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
Comments
Currently in VSCode, there's a way to change the text color using the There's a way to tweak hints' colors more, here are all possible options: https://vshaxe.github.io/vscode-extern/vscode/ThemableDecorationAttachmentRenderOptions.html , but this requires the code changes in here: https://github.com/rust-analyzer/rust-analyzer/blob/30eb458b4fa8adcecd8cbf731bd1cfa9a7a8b88b/editors/code/src/inlay_hints.ts#L46 |
Worked beautifully. Thanks. Add the following to "workbench.colorCustomizations": {
"rust_analyzer.inlayHint": "#bbbbbb"
}, Of course, change |
@schungx , just update that the way you mentioned is no longer valid, new way to figure this out is like this:
referring to : https://rust-analyzer.github.io/manual.html. |
Somehow the new way is not working... The old way with |
Make sure your rust-analyzer is up to date, this change should be a bit older no already I believe. |
Ah, it should say |
Nope... changed it and still not working. Still grayed out. I think the setting is still not correct... |
That preference doesn't exist, it needs to be set in |
The old way is the |
This works for me {
"workbench.colorTheme": "rustdoc dark",
// "editor.inlayHints.fontSize": 11,
"editor.inlayHints.fontFamily": "Courier New",
"workbench.colorCustomizations": {
// Name of the theme you are currently using
"[rustdoc dark]": {
"editorInlayHint.foreground": "#888a",
"editorInlayHint.background": "#0000"
// Overrides for specific kinds of inlay hints
// "editorInlayHint.typeForeground": "#fdb6fdf0",
// "editorInlayHint.parameterForeground": "#fdb6fdf0",
}
}
} |
hi @Plasmatium what theme and font do you use? it looks nice. |
Hi @yuhongyu879 please refer to the settings below. I remove the {
"editor.fontFamily": "Cascadia Code PL",
"editor.fontLigatures": true,
"editor.fontSize": 14,
"workbench.colorTheme": "Mariana Pro (Gray)",
"editor.inlayHints.fontFamily": "Courier New",
"workbench.colorCustomizations": {
"editorInlayHint.foreground": "#888a",
"editorInlayHint.background": "#0000",
},
"editor.tokenColorCustomizations": {
"keywords": {
"fontStyle": "bold"
}
},
} |
@Plasmatium This worked for me. Thanks! |
I tried to add @Plasmatium's
In retrospect, I probably should have interpreted this as meaning to put the settings in the workspace file, as I eventually tried that and it worked. // workspace file
{
// ...
"settings": {
"workbench.colorCustomizations": {
"editorInlayHint.foreground":"#bc0a",
"editorInlayHint.background":"#0000"
}
}
} |
This works in 2023 |
The current color is too similar to the code text, making code harder to read. I'd prefer a much lighter color - you only need to read it when you want to know the type.
The text was updated successfully, but these errors were encountered: