-
Notifications
You must be signed in to change notification settings - Fork 1.8k
VSCode completion: wrong suggestions after typing a keyword #4566
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
Comments
Will investigate that |
This problem exists only in VSCode. When I type Vscode itself does the filtering (fuzzy search?) of all the items we produce. When it sees certain keywords it starts the fuzzy search from the next symbol after the keyword (in your case it is Anyways the only thing in our completion items containing space is The same happens with So probably if we would add the keywords |
Hmm I'm pretty sure I've seen this in Emacs as well 🤔 I think we should provide all keywords as completions, it's just not implemented yet. But we also shouldn't be providing these macro completions in a position where they aren't valid. |
I thought that initial design decision was to provide everything that's possible and leave IDE to do fuzzy search on top of that. But it also seems reasonable to do filtering on our own, so that we would get same behaviour on different IDE's |
But The fact that it proposes the |
@flodiebold Does it make sense to have two PRs? One will introduce keywords like |
Yes, these are completely separate problems. |
Ok, I will start with adding keywords |
4700: Add top level keywords completion r=matklad a=mcrakhman This fixes the following issue: #4566. Also added simple logic which filters the keywords which can be used with unsafe on the top level. Co-authored-by: Mikhail Rakhmanov <[email protected]> Co-authored-by: Aleksey Kladov <[email protected]>
Seems to work ok on master, |
Only tested in VSCode, so may be a problem with it or with its
rust-analyzer
extension. Please point me to the right place to report this issue to if so.Whenever I type a keyword like
unsafe
orimpl
orstruct
it suggests thethread_local!
snippet, which is very annoying.Here, I've recorded my screen demonstrating the issue: https://www.youtube.com/watch?v=z6Y7kRvu6og
Note: when I type the keyword
if
inside a function, it doesn't suggest anything. But if it's typed outside a function (i.e. where it's not supposed to be) we see the same error as with other keywords. Maybe that helps.Thanks.
The text was updated successfully, but these errors were encountered: