You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Intellisense should be hidden when inside new function brackets #1254
when you write a new function, intellisense suggestions pop up as soon as you finish myFunc(). They stay up when you add curly braces myFunc() {}. This means when you press enter to create a multiline function, the intellisense snippet item is inserted instead.
Pressing enter gives:
intellisense should be hidden here, so that you can add a line w/out triggering a snippet.
Thanks for the report! I can repro something, but I'm not sure if it's exactly what you're seeing. The issue I see is when pressing <space> after the parens:
Eg.:
myFunc()/* press space here, ready to type { */
Though I see much more than just the snippets:
The reason the snippet provider doesn't have code like you linked, is that it's related to trigger characters. For the non-Snippet provider, we register it like this:
The last parameter there is a set of characters that will automatically trigger the completion. We include characters like { in there, but we don't want completion to open when typing that inside strings (for example), so the code you found is to bail out if we think we're somewhere that completion wouldn't make sense.
However, the snippet provider is registered differently:
These don't have any trigger characters, so won't cause the completion list to open on its own.
That all said - the snippets in your list are Dart snippets, and those are provided to VS Code in a JSON file that doesn't go through any of our code at all:
I've opened #1256 about the issue I mentioned above, and fixed as part of #1256. I'm not sure it's what you're seeing though - but feel free to try out master if you want - just clone this repro, open the folder in VS Code and hit F5 and it should launch the VS Code Extension Development Host with the extension running inside it.
For some reason, i'm not getting the issue anymore, even without the new changes. I have no idea why it started working all of a sudden. Anyway, I will close this issue. Thanks for the quick response!
I think it was a bug with vscode, as the only thing I did before it started working was updating to a new insiders version. Sorry to bother you with a bug that wasn't even your fault.
No worries - thanks for reporting anyway; I'd rather a report that turns out to be nothing than not know about a possible bug (and also without this I wouldn't have fixed the bug I spotted above)!
Glad it's sorted anyway, if you do see it again, do let me know. Insiders releases can be a bit volatile, but we've been hit with breaking changes in them before, so I'd still encourage raising issues you find when using it! 👍
Activity
nklayman commentedon Oct 16, 2018
Looks like this shouldn't happen because of this line. However, as you can see in the image, the suggestions still show.
nklayman commentedon Oct 16, 2018
It also only shows snippets, maybe because that check isn't included in the snippet provider.
DanTup commentedon Oct 16, 2018
Thanks for the report! I can repro something, but I'm not sure if it's exactly what you're seeing. The issue I see is when pressing
<space>after the parens:Eg.:
Though I see much more than just the snippets:
The reason the snippet provider doesn't have code like you linked, is that it's related to trigger characters. For the non-Snippet provider, we register it like this:
The last parameter there is a set of characters that will automatically trigger the completion. We include characters like
{in there, but we don't want completion to open when typing that inside strings (for example), so the code you found is to bail out if we think we're somewhere that completion wouldn't make sense.However, the snippet provider is registered differently:
These don't have any trigger characters, so won't cause the completion list to open on its own.
That all said - the snippets in your list are Dart snippets, and those are provided to VS Code in a JSON file that doesn't go through any of our code at all:
https://github.com/Dart-Code/Dart-Code/blob/master/package.json#L62-L67
Is there anything in the completion list besides the Dart snippets? Could you post a full list of compare it to the snippets file?
(Also, please confirm your VS Code and Dart extension versions).
DanTup commentedon Oct 16, 2018
I've opened #1256 about the issue I mentioned above, and fixed as part of #1256. I'm not sure it's what you're seeing though - but feel free to try out
masterif you want - just clone this repro, open the folder in VS Code and hit F5 and it should launch the VS Code Extension Development Host with the extension running inside it.nklayman commentedon Oct 16, 2018
For some reason, i'm not getting the issue anymore, even without the new changes. I have no idea why it started working all of a sudden. Anyway, I will close this issue. Thanks for the quick response!
nklayman commentedon Oct 16, 2018
I think it was a bug with vscode, as the only thing I did before it started working was updating to a new insiders version. Sorry to bother you with a bug that wasn't even your fault.
nklayman commentedon Oct 16, 2018
I remember it working fine in JS though. Anyway, it works now.
DanTup commentedon Oct 16, 2018
No worries - thanks for reporting anyway; I'd rather a report that turns out to be nothing than not know about a possible bug (and also without this I wouldn't have fixed the bug I spotted above)!
Glad it's sorted anyway, if you do see it again, do let me know. Insiders releases can be a bit volatile, but we've been hit with breaking changes in them before, so I'd still encourage raising issues you find when using it! 👍