Skip to content

Auto-complete triggering keyword completions too often #12317

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

Closed
dsyme opened this issue Oct 30, 2021 · 5 comments · Fixed by #12318
Closed

Auto-complete triggering keyword completions too often #12317

dsyme opened this issue Oct 30, 2021 · 5 comments · Fixed by #12318

Comments

@dsyme
Copy link
Contributor

dsyme commented Oct 30, 2021

If we type this:

type Option(v)

then void appears as a completion - when we hit : this text is inserted

image

@dsyme dsyme added the Bug label Oct 30, 2021
@dsyme dsyme changed the title Auto-complete triggering keyword completions too ofte Auto-complete triggering keyword completions too often Oct 30, 2021
@smoothdeveloper
Copy link
Contributor

Beside avoiding : to complete, what would be the ideal expected behaviour, beyond the bug fix?

Maybe it should only list things that are valid as binding pattern in this particular context ? maybe propose some of the attributes that are valid to put on method parameters (with the whole [< >] prefix/suffix baked in the intelisense list).

@dsyme
Copy link
Contributor Author

dsyme commented Oct 30, 2021

Labelling this as a regression - it's been like this a while but not forever, and should never have been allowed to regress

@dsyme
Copy link
Contributor Author

dsyme commented Oct 30, 2021

Beside avoiding : to complete, what would be the ideal expected behaviour, beyond the bug fix?

I don't really know, I haven't looked at the FSharp.Editor completion code in quite a long time and it's a bit unclear what all the options are.

My first thought on a minimal fix is that this

should be noCommitOnSpaceRules? Are you familiar with this code?

It seems this only affects keywords, and may be exactly what's needed? It seems to fix the problem? I've only ever noticed this problem with keywords.

What I don't understand is why this

rules = getRules intellisenseOptions.ShowAfterCharIsTyped,
depends on the intellisense options.

@cartermp Do you have any insight here? thanks

@dsyme
Copy link
Contributor Author

dsyme commented Oct 30, 2021

Fixed by #12318, manual testing so far

@dsyme
Copy link
Contributor Author

dsyme commented Oct 30, 2021

Duplicate of #11145

@dsyme dsyme marked this as a duplicate of #11145 Oct 30, 2021
@dsyme dsyme closed this as completed Oct 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants