Skip to content

Completion list should remain open if suitable match is not found #10204

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
NoelAbrahams opened this issue Aug 8, 2016 · 8 comments
Closed
Assignees
Labels
Suggestion An idea for TypeScript Visual Studio Integration with Visual Studio
Milestone

Comments

@NoelAbrahams
Copy link

TypeScript Version: 2..0 Beta / VS 2105 Update 3

Code

Here's a comparison of typing in a C# vs TypeScript code file:

C#
c

TS
ts

Expected behavior:

The completion list should remain open if a suitable match is not found.

Actual behavior:

The list closes when an incorrect key is typed.

This makes it difficult to backtrack when a mistake is made. I believe this was a regression in 1.8 or thereabouts.

@DanielRosenwasser DanielRosenwasser added Bug A bug in TypeScript Visual Studio Integration with Visual Studio labels Aug 8, 2016
@DanielRosenwasser DanielRosenwasser added this to the TypeScript 2.1 milestone Aug 8, 2016
@paulvanbrenk paulvanbrenk removed this from the TypeScript 2.1 milestone Aug 8, 2016
@paulvanbrenk
Copy link
Contributor

On the other hand consider the following, which is valid javascript:

var x = { y: 10 }

var x.hello ... 

showing the completion list while still typing hello can be confusing... we'll make this an option at some point.

@NoelAbrahams
Copy link
Author

NoelAbrahams commented Aug 8, 2016

I have personally found this to be an obvious hindrance to productivity.

For example, when looking for say apple, I type app and since apple is still not within selecting distance I need to type another character. At this point if I mistype a letter, say appx the completion list disappears.

Now in order to bring it back up, I need to delete all of appx and start again.

We could perhaps fix this this by bringing up the list when x is deleted. But that doesn't happen at present.

@NoelAbrahams
Copy link
Author

Also I don't understand why var x.hello ... is valid JavaScript. Is this not to do with TypeScript?

@paulvanbrenk
Copy link
Contributor

Bringing the completion list back would be something we would need to specifically implement for TypeScript, which makes it expensive and thus low on the list of features we're considering.

You can always hit [CTRL] + [Space] to bring back the completion list, after if closed.

@NoelAbrahams
Copy link
Author

@paulvanbrenk, I understand that you are trying to balance the needs of people writing plain JavaScript.

But the first consideration ought to be for those working in TypeScript. Yes, I can bring back the list with Ctrl+Space, but I have to first delete the last character and press two more keys. Altogether it's 3 more keys now for functionality that was working correctly before.

I really do not find the argument that the list remains open when typing non-existent properties in JavaScript to be a compelling one. Firstly it's lazy and stubborn not to adopt TypeScript and secondly one can always hit escape to dismiss the completion box (one key vs. 3).

Please consider adding this back to the 2.1 milestone.

@paulvanbrenk
Copy link
Contributor

As mentioned earlier in the thread, we'll make this behavior an option.. not going to commit for 2.1, but we're working on some IntelliSense options infrastructure now, so it's coming.

@paulvanbrenk paulvanbrenk added Suggestion An idea for TypeScript and removed Suggestion An idea for TypeScript labels Aug 9, 2016
@mhegazy mhegazy added Suggestion An idea for TypeScript and removed Bug A bug in TypeScript labels Sep 21, 2016
@NoelAbrahams
Copy link
Author

Wow nothing on this?

I mean somebody breaks a working piece of code in TypeScript in order to fix an obscure issue for JavaScript users and nothing gets done about it.

This is very disappointing.

@RyanCavanaugh
Copy link
Member

We're transitioning to LSP which will mean this behavior is language-agnostic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Suggestion An idea for TypeScript Visual Studio Integration with Visual Studio
Projects
None yet
Development

No branches or pull requests

5 participants