Stream: t-compiler/rust-analyzer

Topic: typenum inlay hints


Florian Diebold (Dec 21 2020 at 14:45, on Zulip):

welp, maybe we need some way of saying "don't show this type in hints":
2020-12-21-154302_940x117_scrot.png

Lukas Wirth (Dec 21 2020 at 14:47, on Zulip):

Don't we have the typehint length limit for this?

Florian Diebold (Dec 21 2020 at 14:48, on Zulip):

yeah sure, but that doesn't mean showing such types is fine as long as they don't reach the limit

Florian Diebold (Dec 21 2020 at 14:48, on Zulip):

in fact, showing an ellipsis somewhere in the middle of this type makes it even more useless

Laurențiu (Dec 21 2020 at 14:49, on Zulip):

I'm still waiting for chalk to get precise enough so http://www.treblig.org/daveG/rust-mand.html can work in RA

Laurențiu (Dec 21 2020 at 14:50, on Zulip):

Re. shortening, I think we just stick an ellipsis in the middle of a type. But something smarter like showing GenericArray<u8, ...> wouldn't be so bad

Lukas Wirth (Dec 21 2020 at 14:51, on Zulip):

Ye I suppose the current trimming isnt the best in this case? not sure
image.png

Laurențiu (Dec 21 2020 at 14:51, on Zulip):

Ah, that's still better than what I recalled

lqd (Dec 21 2020 at 14:57, on Zulip):

@Florian Diebold I have the same thing ^^ image.png

matklad (Dec 21 2020 at 14:58, on Zulip):

I hereby coin the term: longly typed language

Florian Diebold (Dec 21 2020 at 15:00, on Zulip):

@lqd you can set rust-analyzer.inlayHints.maxLength to improve this

lqd (Dec 21 2020 at 15:01, on Zulip):

sweet, thank you

Florian Diebold (Dec 21 2020 at 15:01, on Zulip):

I should do that as well

Florian Diebold (Dec 21 2020 at 15:01, on Zulip):

we should maybe set that by default

Last update: Jul 26 2021 at 13:00UTC