-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
Add add_to_top_level_lambda_param assist #41
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit message should be capitalized (but without period .
).
It seems cannot handle vertical lambdas currently. But it's okay to handle this outside this PR.
{ foo
, bar
, baz
, withQux ? false, quz # There are also some mixes.
}:
{
# ...
}
#[test] | ||
fn simple() { | ||
check("{ }: foo$0", expect!["{ foo }: foo"]); | ||
check("{}: foo$0", expect!["{foo }: foo"]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems kind of weird. Is this expected?
IMO, braces should always leave spaces inside. From this perspective, this is acceptable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the test just to check that the insert-before-space logic doesn't break anything. I don't think it looks good, but I also don't think the extra logic required is worth it for unconventional formatting
suggests
{ }: foo
->{ foo }: foo
related issue: #39