-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Inlay hints highlighted #11733
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
This is the styling of the native inlay hints (released this week, see https://rust-analyzer.github.io/thisweek/2022/03/14/changelog-120.html). They can be configured, though. But never mind the styling, what happened with the function argument there? |
How to revert to making the inlay transparent like it used to? |
I have only noticed that after I took the screenshot, I also couldn't reproduce whatever glitch that was. Maybe it's worth noting though, that at least in my case I have noticed that the
are now customized using native VSCode settings instead of rust-analyzer-specific ones and that possibly there is no equivalent for the chainingHints color available in VScode settings yet. |
FYI - I opened an issue about making the inlay hints look more like the old-style inlay hints via a config in vs-code here: microsoft/vscode#145191 Discussion is ongoing! |
See also the docs: https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/user/manual.adoc#color-configurations (the rendered version of the PR you've linked to).
They're slower while typing because Code intentionally delays updating them. |
Let's close this, since there's nothing we can do about the formatting (except coordinating with Code, like jhgg did). If you run into glitchy hints again, please check the |
@lnicola Thanks for the link, maybe it's worth noting that those changes are not reflected in the rust-analyser website specifically in the link provided under configuration in the extension's home page. I will be happy to contribute if you can provide me guidance. |
The published manual is updated automatically on Monday after the release. So there's no need to do anything about it. |
@Fenex what if you set the hint background to black or transparent? |
@Fenex using this settings made it look almost like how it used to be except for the padding "workbench.colorCustomizations": {
"editor.inlayHints.fontFamily": "Courier New",
"editor.inlayHints.fontSize": 11,
"[Your-theme-name]": {
"editorInlayHint.foreground": "#868686f0",
"editorInlayHint.background": "#ff000000",
"editorInlayHint.typeForeground": "#aaa5aaf0",
"editorInlayHint.parameterForeground": "#fdb6fdf0"
} don't forget to substitute |
@lnicola @YounessBird thanks very much for your help. Your listing is really help me and now I'm happy again! Howver. By the way. I don't think that this change was really indeed. An infered types are not importantly in a code, it's just an optional notes (notes that can make more clear of small piece of the code). A code must explains general sense of alghorithm and infered types is secondary stuffs. I'm sure any secondary stuff must be smaller, opacitier and non-yellier by default. I want pay your attention to my above screenshot: there is a default theme and result view is very-very awful (my opinion). I guess this will afraid new little rustaceans (hope i wrong) :( |
@Fenex this change replaced a hacky implementation of inlay hints (using CSS About the styling itself, that's the decision of the Code maintainers. The background was added because the hints themselves looked very similar to the inline completion suggestions. Fortunately, it's relatively customizable, and it will probably get better in time. |
Wow. Thanks for exhaustive explanation! My fail I thought this was only visual change. Now it's clear. Thank you for support! |
I've opened a feature request on vscode's end to allow the delay to be user configurable! |
First of all, massive thanks for creating this tool.
I have been using rust analyzer's "Inlay hints" for quite a while and I noticed yesterday that this feature is now somehow highlighted in my code. I thought maybe it was an automatic update, so I tried previous version of rust analyser but I still could see the highlight, I have also tried the options in the settings, and that didn't work either.
I am using VsCode, version: 1.65.2.

here is a screenshot of what the highlight looks like
Please let me know if there are any more information required.
The text was updated successfully, but these errors were encountered: