-
Notifications
You must be signed in to change notification settings - Fork 29.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
Weird auto-completion results for Azure Storage Account type #5574
Comments
@aeschli might be something we want to fix for April. |
@jrieken the JSON provider returns a CompletionList with an empty array of items. |
@jrieken Maybe it would make sense to make the 'showTextualProposals' a setting on CompletionList. |
Actually, I was wrong about the empty array, falsy values and the empty array are considered to be a not good result which means delegate to next level of suggest. This is the defined behaviour and should be like this ever since JSON became an extension. Suggest works by keeping an ordered chain of providers and goes through them until one produces a result. In the scenario here, the schema apparently says there are zero completion for this property. That makes the next provider become active. Because it's a system of fairness I don't want to allow a provider to block/disable all providers that come after him just because he didn't yield a result - that's a no to flags ala I think the meta question here is what do you expect from IntelliSense? Is it about deriving text from a set of rules (grammar, schemas, etc) or about typing faster with suggestions ranging from correct to useful? It might just boil down to personal preference and looking at the sample above I see two camps
Personally, I am clearly in the latter fraction but I understand how people might not like that. So, I believe what it takes is a user setting to control how the empty array returned by a completion provider is to be interpreted - as empty result or invite to continue in the chain. The delegation rules will be then
|
I think both mindsets (bullet points) above make sense, and I can certainly see a case for both scenarios. Personally I enjoy the "strictness" of JSON schema, but I can see how "useful-but-not-entirely-accurate" auto-completion provides some value also. User-configurable sounds like a good way to go. Thanks for working on this. |
I have mixed feelings about a I think we should think about textual suggestions as an exception to the rule and create a setting for controlling that exception, instead of considering it to be another link in the suggestion chain; and a dumb one for that matter. I'd propose instead to go with a |
+1 for Joao's proposal. But IMO the default should be that the language specific completion support can choose when textual completions are appropriate, as @alexandrudima mentioned. In the case of JSON, that would be inside comments and strings. The explanation of the That will IMO please the two user camps described by Joh:
|
@joaomoreno I am not against making the textual suggest logic configurable and 'yes' what you propose can replace the new config setting. Tho if we decide to take it out of the chain of providers and treat it special we will not ever be able to move textual suggestion logic into an extension. Something I though is desirable but also willing to give up. @aeschli No to |
@jrieken |
The problem is that it would also need |
It is a recommendation. If set by at least one provider and the |
Yes, but I don't want to fix one problem is a special way |
I have revert the change and I am opting to move this to May cos this is too much controversy for an endgame fix. |
As input for the discussion: The problem with |
Well, As for the second part, I think that is quite alright. A dictionary extension can always send out suggestions with kind |
That's my point. It's a difference to get textual completions in places where a language service didn't compute any (like discussed here) and not getting any suggestions ever in files that lack a language service. The settings must differentiate these two cases, otherwise we simply move textual completions into an extension and tell people to uninstall it. |
Well, that's what the |
IMO that's an oversimplification that let's just agree to disagree. |
No need to throw hands in the air. I don't disagree with you, I'm just having problems with the arguments against the setting. In fact, I would be willing to bet that I am the one that is missing some detail(s) here. Remember that my approach was laid out in my first comment: I think about textual suggestions as an exception to the rule. Given that viewpoint, the three possible values seem to fit every use case, don't they? You are either Yes, you can implement the same behaviour by putting textual completions into an extension and tell people to disable them. But what good would that do? |
IMO this: Someone doesn't like textual suggestions in JSON and turns the setting to |
Yeah, but isn't that just settings scoped by language, for which we are long due? Editorconfig solves a lot of that, but not everything. For instance, I also dislike auto suggestions in some languages, and would like to disable them, although I do like it in others. |
Yeah, that's one option |
There is now |
Steps to Reproduce:
NOTE: It used to provide blank results, but after the most recent VS Code upgrade, it started providing these really odd results.
Cheers,
Trevor Sullivan
https://trevorsullivan.net
https://twitter.com/pcgeek86
The text was updated successfully, but these errors were encountered: