Skip to content
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 inlay parameter name hints for call expr #2843

Merged
merged 3 commits into from Jan 15, 2020
Merged

Conversation

imtsuki
Copy link
Contributor

@imtsuki imtsuki commented Jan 14, 2020

This patch adds Intellij-like parameter name hints for literal values in function calls.

Screenshot

Signed-off-by: imtsuki me@qjx.app

Signed-off-by: imtsuki <me@qjx.app>
@imtsuki
Copy link
Contributor Author

imtsuki commented Jan 14, 2020

Oops, I forgot to update the test snapshot. Now the CI should pass.

Signed-off-by: imtsuki <me@qjx.app>
Copy link
Member

@matklad matklad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation looks good to me!

One day we should refactor FnSignature to work with hir and not with ast, but that is unrelated to this PR!

crates/ra_ide/src/display/function_signature.rs Outdated Show resolved Hide resolved
@imtsuki
Copy link
Contributor Author

imtsuki commented Jan 15, 2020

comment addressed

@matklad
Copy link
Member

matklad commented Jan 15, 2020

bors r+

Thanks!

bors bot added a commit that referenced this pull request Jan 15, 2020
2843: Add inlay parameter name hints for call expr r=matklad a=imtsuki

This patch adds Intellij-like parameter name hints for literal values in function calls.

<img width="624" alt="Screenshot" src="https://user-images.githubusercontent.com/8423594/72366533-68d7f800-3735-11ea-9279-cf193ca8ca2f.png">

Signed-off-by: imtsuki <me@qjx.app>

Co-authored-by: imtsuki <me@qjx.app>
@bors
Copy link
Contributor

bors bot commented Jan 15, 2020

Build succeeded

  • Rust (macos-latest)
  • Rust (ubuntu-latest)
  • TypeScript

@bors bors bot merged commit d854ad8 into rust-lang:master Jan 15, 2020
@imtsuki imtsuki deleted the param-hint branch January 15, 2020 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants