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

Rust autocomplete full path visibility #13494

Closed
1 task done
konstantinzolotarev opened this issue Jun 25, 2024 · 7 comments · Fixed by #13505 or #13797
Closed
1 task done

Rust autocomplete full path visibility #13494

konstantinzolotarev opened this issue Jun 25, 2024 · 7 comments · Fixed by #13505 or #13797
Labels
autocompletions Feedback for code completions in the editor bug [core label] language An umbrella label for all programming languages syntax behaviors rust Rust programming language support

Comments

@konstantinzolotarev
Copy link

Check for existing issues

  • Completed

Describe the feature

Rust autocomplete doesn't show full module path for suggestions, and when there are several options with same name it's hard to understand what will be added.

For example writing opening autocomplete for Result that might be added from anyhow::Result or other it's impossible to know where Result is from. The only way is to try to guess by docs, but it's also very hard.

Screenshot 2024-06-25 at 11 44 51

If applicable, add mockups / screenshots to help present your vision of the feature

No response

@konstantinzolotarev konstantinzolotarev added admin read Pending admin review enhancement [core label] triage Maintainer needs to classify the issue labels Jun 25, 2024
@osiewicz
Copy link
Contributor

Hey, thanks for filling this issue. This actually looks like a regression from #13043, as we don't read that field in Rust. Completions used to look as follows on last Stable:
image

@konstantinzolotarev
Copy link
Author

Awesome !
Thank you very much !

@notpeter notpeter added rust Rust programming language support language An umbrella label for all programming languages syntax behaviors autocompletions Feedback for code completions in the editor bug [core label] and removed triage Maintainer needs to classify the issue admin read Pending admin review enhancement [core label] labels Jun 25, 2024
@konstantinzolotarev
Copy link
Author

konstantinzolotarev commented Jun 28, 2024

Updated to latest Preview Release. Zed 0.142.2, Thank you guys very much for fix !

Now some of suggestions has module names, but not all. Not sure if it's expected behaviour.
So @osiewicz it's up to Zed team, if this should be reopened or not.

Screenshot 2024-06-28 at 15 43 16

Screenshot 2024-06-28 at 15 43 36

@ynuwenhof
Copy link

I'm currently facing the same behavior on Zed Dev 0.143.0.

image

@osiewicz
Copy link
Contributor

osiewicz commented Jul 3, 2024

Ok, I've screwed up. We prefer .detail field if it's available right now, whereas in reality we should grab label_detail.detail first.
I'll fix it promptly, here's a sneak-peek of my dev build:
image
image

@osiewicz osiewicz reopened this Jul 3, 2024
osiewicz added a commit that referenced this issue Jul 3, 2024
In doing so we get to surface origin packages more prominently.

Fixes #13494  (again)

Release Notes:

- Fixed origin packages not being surfaced in Rust completions
@konstantinzolotarev
Copy link
Author

OMG, it's so awesome !
@osiewicz Thank you very much !!! It works like a charm.

@gngeorgiev
Copy link

@osiewicz I don't think this works as of Zed 0.167.1 :/

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autocompletions Feedback for code completions in the editor bug [core label] language An umbrella label for all programming languages syntax behaviors rust Rust programming language support
Projects
None yet
5 participants