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

feat: preview adt field when hover #15847

Merged
merged 1 commit into from
Nov 8, 2023

Conversation

wasd96040501
Copy link
Contributor

@wasd96040501 wasd96040501 commented Nov 7, 2023

Closes #13977
20231108194345_rec_

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 7, 2023
@lnicola
Copy link
Member

lnicola commented Nov 7, 2023

Nit: we should probably match the standard Rust formatting (struct Foo {).

crates/hir/src/display.rs Outdated Show resolved Hide resolved
@wasd96040501
Copy link
Contributor Author

Nit: we should probably match the standard Rust formatting (struct Foo {).

Sure. Fixes have been pushed.

@lnicola
Copy link
Member

lnicola commented Nov 8, 2023

Unrelated, let's test this little thing:

@bors2 try

@lnicola
Copy link
Member

lnicola commented Nov 8, 2023

@bors2 try

@rust-bors-staging
Copy link

⌛ Trying commit 4f89b20 with merge cfa8999

@lnicola

This comment was marked as off-topic.

@rust-bors-staging

This comment was marked as off-topic.

@rust-bors-staging
Copy link

☀️ Try build successful

  • CI
    Build commit: cfa8999 (cfa89995167a42740da9d1af4e15e0b05f63ac19)

@lnicola
Copy link
Member

lnicola commented Nov 8, 2023

Thanks, would you mind squashing?

@wasd96040501
Copy link
Contributor Author

Thanks, would you mind squashing?

Sure, already squashed.

@lnicola
Copy link
Member

lnicola commented Nov 8, 2023

@bors r+

@bors
Copy link
Contributor

bors commented Nov 8, 2023

📌 Commit 41bcd54 has been approved by lnicola

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Nov 8, 2023

⌛ Testing commit 41bcd54 with merge 7059ae2...

@bors
Copy link
Contributor

bors commented Nov 8, 2023

☀️ Test successful - checks-actions
Approved by: lnicola
Pushing 7059ae2 to master...

@bors bors merged commit 7059ae2 into rust-lang:master Nov 8, 2023
9 checks passed
@Veykril
Copy link
Member

Veykril commented Nov 10, 2023

Related #3197, that is we might want to do something similar for enum (variants).

@Veykril
Copy link
Member

Veykril commented Nov 10, 2023

I think we might want to expose a config for this, to enable, disable and maybe set a maximum field amount to render? Unsure, will probably see after having used this a bit.

bors added a commit that referenced this pull request Mar 5, 2024
…eykril

feat: add hover display for trait assoc items

This PR enable preview assoc items when hover on `trait`

![image](https://github.com/rust-lang/rust-analyzer/assets/71162630/d9c3949c-33cf-4a32-aa97-3af46b28033a)

inspired by #15847
bors added a commit that referenced this pull request Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Preview struct fields when hover on type.
5 participants