Skip to content
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

intellisense is not showing top options first #43429

Closed
luisrudge opened this issue Feb 11, 2018 · 15 comments
Closed

intellisense is not showing top options first #43429

luisrudge opened this issue Feb 11, 2018 · 15 comments
Assignees
Labels
suggest IntelliSense, Auto Complete under-discussion Issue is under discussion for relevance, priority, approach verified Verification succeeded
Milestone

Comments

@luisrudge
Copy link

everytime I hit ctrl+space for auto completion of parameters, I have to scroll up up up until I find the interface options.

image

image

"editor.snippetSuggestions": "bottom",

vscode: Version 1.20.0 (1.20.0)
mac osx 10.13.3

@vscodebot vscodebot bot added editor editor-find Editor find operations labels Feb 11, 2018
@octref octref added suggest IntelliSense, Auto Complete and removed editor editor-find Editor find operations labels Feb 13, 2018
@octref octref assigned jrieken and unassigned mjbvz Feb 13, 2018
@luisrudge
Copy link
Author

luisrudge commented Feb 14, 2018

I think the current behavior is a bit confusing and totally not something I would expect.

Let's run some scenarios:

Scenario 1

"editor.snippetSuggestions": "top",
"editor.suggestSelection": "first",

ctrl+space when writing ts

image

That's exactly what I expect

ctrl+space when trying to autocomplete some interface properties

github-1

That's NOT what I expect. If I'm trying to auto complete properties, they should be the first ones to be shown at all times.

Scenario 2

"editor.snippetSuggestions": "bottom",
"editor.suggestSelection": "first",

ctrl+space when writing ts

image

That's NOT what I expect. I'm trying to writing code, not instantiating a new thing. So snippets should take precedence over other stuff.

ctrl+space when trying to autocomplete some interface properties

github-2

That's exactly what I expect

=============================================

So, I hope I'm not asking too much here, but how can I mix both "modes" in a way that the editor is smart enough to "activate" the correct mode for the task?

@chanlito
Copy link

I'm also having this issue too, when I ctrl + space I expect top result to be property of interfaces, classes .... not having to scroll up to find them.

@JoelEinbinder
Copy link

When writing JavaScript, seeing a bunch of word selections signals to me that Intellisense lost track of my object and is considering it an any type. With the new behavior, it took me a few days to realize something was wrong with the suggestion box instead of the autocomplete. I think the old behavior should be the default.

@jrieken jrieken added this to the March 2018 milestone Feb 26, 2018
@jrieken
Copy link
Member

jrieken commented Feb 26, 2018

There is two things that collide... For once our snippets aren't contextual and always computed (without any language smarts). So, they are always there but by default sitting at the bottom. With the new suggest-memories tho we might reveal them too aggressively. We can tweak that (e.g. don't use the memory when the line is empty).

Until then you can use this setting: "editor.suggestSelection": "first"

@luisrudge
Copy link
Author

@jrieken I tried this, you can see in both my scenarios I had this set to "first", which still makes it unusable with either snippets or properties (depending on the editor.snippetSuggestions)

@jrieken
Copy link
Member

jrieken commented Feb 27, 2018

Yeah, once you "boost" snippets you will run in the issue of snippets being without context

@luisrudge
Copy link
Author

@jrieken and if I don't boost the snippets, then snippets are not usable at all. Is there a way to rollback to the way it worked before? Or any set of configurations that emulates what we had before?

@jrieken
Copy link
Member

jrieken commented Feb 27, 2018

Setting this "editor.suggestSelection": "first" is actually the "before" behaviour.

@luisrudge
Copy link
Author

idk man.. Me and everyone else here didn't have this issue before.. so I'm guessing something changed.

@jrieken
Copy link
Member

jrieken commented Feb 27, 2018

Well, I was out three weeks but I am pretty sure that I am the only one working this feature. The default value for editor.snippetSuggestions is inline (since at least 10 months). The implementation of top, bottom didn't change in more than a year.

The new feature is about selecting not sorting and to restore the old behaviour use: suggestSelection: first. That means always select the item sorted to the top.

I know that doesn't make this less frustrating and I totally agree with the static-snippet vs dynamic-completions dilemma but I don't think that this is new.

@luisrudge
Copy link
Author

Makes sense. I'm not sure why I only noticed this now then. It was my first project with typescript, so maybe that's why 😝
Do you think what changed is the scroll position of the suggestions? Maybe that's why more people feel that the whole suggestion situation changed?

@chanlito
Copy link

Did the vscode team broke something or it's a new feature? This behaviour never happened before.

@jrieken
Copy link
Member

jrieken commented Feb 27, 2018

Do you think what changed is the scroll position of the suggestions

Yeah, what's what I mean by selection. The first setting restores the old behaviour, the default should be conservative enough but there is plans to skip the memory when on an empty line

@jrieken
Copy link
Member

jrieken commented Feb 27, 2018

This comment explains what each setting does: #41060 (comment)

@jrieken jrieken added the under-discussion Issue is under discussion for relevance, priority, approach label Mar 20, 2018
@DanTup
Copy link
Contributor

DanTup commented Mar 26, 2018

@jrieken

there is plans to skip the memory when on an empty line

I just got this:

screen shot 2018-03-26 at 11 11 01

I believe it's pre-selected override because of the prefix of a space (I typed @override on a blank line earlier), so I don't think the empty line rule will fix all the issues. Maybe the prefix should be ignored if there is any leading whitespace?

@mjbvz mjbvz added the verified Verification succeeded label Apr 26, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators May 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
suggest IntelliSense, Auto Complete under-discussion Issue is under discussion for relevance, priority, approach verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

7 participants