-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Complete extern crates in extern crate items #13002
Comments
I figure this issue is low-priority, so I'm going to try to use it to get into contributing to rust-analyzer. @rustbot claim |
This requires adding a corresponding variant here rust-analyzer/crates/ide-completion/src/context.rs Lines 291 to 302 in f1b257f
constructing it here rust-analyzer/crates/ide-completion/src/context/analysis.rs Lines 593 to 623 in f1b257f
|
Can I have a go at this issue? :) |
go ahead! |
Apologies for dropping this. I never managed to get this to work, but feel free to take a look at my fork for any code that may be helpful @jmintb. |
I had to focus on uni for a bit, will get back on this now. |
@rustbot claim |
feat: Implement extern crate completion Hi, this is a draft PR for #13002. I have basic completion working as well as a filter for existing extern crate imports in the same file. This is based on the tests, I have not actually tried this in an editor. Before going further I think this is a good point to stop and get feedback on the structure and approach I have taken so far. Let me know what you think :) I will make sure to add more tests, rebase commits and align with the code style guidelines before submitting a final version. A few specific questions : 1. Is there a better way to check for matching suggestions? right now I just test if an extern crate name starts with the current user input. 2. Am I creating the `CompletionItem` correctly? I noticed that `use_.rs` invokes a builder where as I do not. 3. When checking for existing extern crate imports the current implementation only looks at the current source file, is that sufficient?
feat: Implement extern crate completion Hi, this is a draft PR for #13002. I have basic completion working as well as a filter for existing extern crate imports in the same file. This is based on the tests, I have not actually tried this in an editor. Before going further I think this is a good point to stop and get feedback on the structure and approach I have taken so far. Let me know what you think :) I will make sure to add more tests, rebase commits and align with the code style guidelines before submitting a final version. A few specific questions : 1. Is there a better way to check for matching suggestions? right now I just test if an extern crate name starts with the current user input. 2. Am I creating the `CompletionItem` correctly? I noticed that `use_.rs` invokes a builder where as I do not. 3. When checking for existing extern crate imports the current implementation only looks at the current source file, is that sufficient?
feat: Implement extern crate completion Hi, this is a draft PR for #13002. I have basic completion working as well as a filter for existing extern crate imports in the same file. This is based on the tests, I have not actually tried this in an editor. Before going further I think this is a good point to stop and get feedback on the structure and approach I have taken so far. Let me know what you think :) I will make sure to add more tests, rebase commits and align with the code style guidelines before submitting a final version. A few specific questions : 1. Is there a better way to check for matching suggestions? right now I just test if an extern crate name starts with the current user input. 2. Am I creating the `CompletionItem` correctly? I noticed that `use_.rs` invokes a builder where as I do not. 3. When checking for existing extern crate imports the current implementation only looks at the current source file, is that sufficient?
extern crate $0
we should complete all crates names from the extern crate prelude for the current crate hereThe text was updated successfully, but these errors were encountered: