How to configure Rust inline-hints?

已回答

Given Rust in IntelliJ, any idea how I can configure the inline-hints, showing there in gray (like *font-path*, etc)? Actually, I'm not even sure that's what they are - I've been trying all of Settings->Language Defaults->inline-hints, which is what I *thought* they were, but they could be something else.

Functionally, they are not in the code - they are "inferred" by the rust compiler.

Thanks.

IntelliJ 2021.2.4 (Ultimate)

 

0

Thanks for the reply. Looking there, it seems that the only configuration is to disable hints. So there is no option to change the background-color, etc? Similar to other language options? 

0

The color can be configured in `File | Settings | Editor | Color Scheme | Language Defaults` > `Inline hints`.

0

That partly worked, thanks. It did the function-variables, anyway, but none of the options I tried, seem to affect the variable-hints ("let context: Bterm = BTermBuilder", where BTerm is the hint). Also, the *border* option doesn't seem to affect any of them, even though I tried a different color. So it goes.

I did originally try that settings-path, just didn't type out the whole path in my post. But it didn't seem to work at the time, presumably I didn't wait long enough - it looks like there is a re-calculation period going on. Plus no border at all, so I thought it wasn't working.

0

According to testing on our side:

Feel free to comment or upvote the mentioned issues. See https://intellij-support.jetbrains.com/hc/en-us/articles/207241135-How-to-follow-YouTrack-issues-and-receive-notifications if you are not familiar with YouTrack.

0

The Foreground/background do certainly work, but then my question is, what is the specific field-name that needs to be edited? Both of the outlined terms (my outline) are inferred by the compiler, and are not in the actual code - the red box, is inside a function, and the Background did change when I changed InlineHints->Parameters->Default. However, the green box, is an inferred variable-type - and I can't find any option for that, either in the Defaults section, or the Rust section. Thanks.

0

>However, the green box, is an inferred variable-type - and I can't find any option for that, either in the Defaults section

Inline hints > Default works for me:

Does it work differently on your side?

0

Ah, yes, it does. Wups - apparently that option I had only done Border, nothing else, which didn't work. When I tried a color-change, it worked, thanks.

It also worked with non-Border types like Underscore, although none of the Effects seem to work on InlineHints->Parameters->Default. Fortunately that's not really vital, I originally just tried Borders because it sounded like the most visible option.

Thanks for the help.

0

请先登录再写评论。