-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Display scope inlay hints after closing brace for more types of blocks #18833
Comments
Hey, could I take a crack at implementing this? |
Go ahead! |
@crsche The recommended rustfmt style is to put the else on the same line, so it doesn't matter usually. |
I think we should probably omit them if something follows the closing brace? Also I just realized how confusing these look as one could interpret them as being implicit code in this position (which they aren't, unlike most of our other hints). I never noticed this as I am no longer using them myself. We might want to have some special disambiguator at the front to mark that? |
That seems like the best approach, maybe something like a pipe character to explicitly separate? |
Also, for conditionals, where should hints jump? //v v v, etc?
if let Some(x) = Some(1) {
..
} |
Either to the |
Currently
fn
andmod
are supported, but it would be nice if things likeloop
,while
(+let
),if
(+let
),let
+else
,match
+ block arms, etc were also supported.On a side note,
async fn
's should showasync fn
The text was updated successfully, but these errors were encountered: