-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Autocomplete/Hints randomly not working #12566
Comments
What r-a version are you using? |
I knew I had forgotten something, it's |
completions randomly failing should be fixed since last week. The issue of flyimport not working in |
I don't think so - I have had the issue for a while (maybe a month or so). I'm currently writing code and it seems to be getting worse, but I'm not too sure how. Are there any logs that could be useful? |
No, logs won't be useful here. Only example snippets where this occurs like the one you gave here. |
Forgive the fact that it's a screenshot, there is an awful lot of code involved. This is within Edit: This probably won't be able to be replicated, but I hope the full code can at least help narrow the issue down: fn main() -> Result<()> {
let matches = cli::get_matches();
match matches.subcommand() {
Some(("header", sub_matches)) => match sub_matches.subcommand_name() {
Some("update-key") => {
let sub_matches_update_key = sub_matches.subcommand_matches("update-key").unwrap();
let keyfile_old = if sub_matches.is_present("keyfile-old") {
KeyFile::Some(
sub_matches
.value_of("keyfile-old")
.context("No keyfile/invalid text provided")?
.to_string(),
)
} else {
KeyFile::None
};
let keyfile_new = if sub_matches.is_present("keyfile-new") {
KeyFile::Some(
sub_matches
.value_of("keyfile-new")
.context("No keyfile/invalid text provided")?
.to_string(),
)
} else {
KeyFile::None
};
subcommands::header::update_key(&get_param("input", sub_matches_update_key)?, keyfile_old, keyfile_new)?;
}
}
}
Ok(())
} (p.s. apologies for the messy code - a refactor is planned) |
Are you still having this problem? |
Yes sadly - I opened VSCode yesterday and saw similar issues. |
Ah, wait this is actually reproducible for me, that is trying to ask for completions in a path qualifier (not sure what I did wrong earlier in my testing). |
Thank you! |
I've had this issue for a while now, and I'll try to be as descriptive as I can.
Within a function, autocomplete sometimes completely stops working (it says "no suggestions"). I'm using only
rust-analyzer
for Rust, and VSCode. This issue has persisted across multiple installs of both VSCode, and Void Linux. I also had the issue on Fedora 36.The issue seems to happen randomly, but the easiest way I can reproduce it is by bringing more than one error into scope.
Here's some example code:
Under normal circumstances, selecting the end of
Instant
and hitting ctrl+space would bring the menu up, offering to importstd::time::Instant
- but it doesn't.It also sometimes happens just randomly, either showing "no suggestions", or relaying a list of my variable names to me.
Using rust-analyzer
7322a982f 2022-06-16
(I'm not too sure where to find a version string)The text was updated successfully, but these errors were encountered: