Skip to content
Please note that GitHub no longer supports Internet Explorer.

We recommend upgrading to the latest Microsoft Edge, Google Chrome, or Firefox.

Learn more
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 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

This comment has been minimized.

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 left a comment

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
Signed-off-by: imtsuki <me@qjx.app>
@imtsuki

This comment has been minimized.

Copy link
Contributor Author

imtsuki commented Jan 15, 2020

comment addressed

@matklad

This comment has been minimized.

Copy link
Member

matklad commented Jan 15, 2020

bors r+

Thanks!

bors bot added a commit that referenced this pull request Jan 15, 2020
Merge #2843
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

This comment has been minimized.

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-analyzer:master Jan 15, 2020
5 checks passed
5 checks passed
Rust (ubuntu-latest)
Details
Rust (windows-latest)
Details
Rust (macos-latest)
Details
TypeScript
Details
bors Build succeeded
Details
@imtsuki imtsuki deleted the imtsuki:param-hint branch Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.