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
Weird snippets suggested before obvious ones #7720
When editing JavaScript files in my project and I want to use the built in snippets like for and console.log, VSCode suggests a ton of snippets, but none of the ones I want. They're all random ones that I have never seen before, like Performance and onbeforeupload. I don't know where these snippets come from.
To test this in isolation I actually created a new JS file on my desktop and it didn't have any of these random snippets and it did go directly to suggesting the pure JS snippets.
So I'm not sure what's happening here. Any suggestions would be appreciated. Thanks!
VS Code shows snippet-suggestions as well as language suggestion in one window. The symbols like Performance, onBefore are suggestion computed by the JavaScript language service. Their actual type is shown by using a different icon. In you test case (2nd screen shot) you hit the unlucky case that the JavaScript language service doesn't work on unsaved/untitled buffers.
Hi Johannes Rieken (@jrieken), thanks for replying. But this is more complicated because in the 2nd screenshot the file was actually saved on my desktop - albeit under the name Untitled-1.js.
So I don't understand why for two JS files, in one I get a ton of random suggested autocompletions, and in the other I only get the core snippets.
Right I see. I was confused because it was saved and had a name, albeit the name was Untitled-1.js. But I just tried it with the identical file, only difference being a different filename and it does work as before.
At least it's consistent then but the primary problem still appears.
Activity
jrieken commentedon Jun 16, 2016
VS Code shows snippet-suggestions as well as language suggestion in one window. The symbols like
Performance,onBeforeare suggestion computed by the JavaScript language service. Their actual type is shown by using a different icon. In you test case (2nd screen shot) you hit the unlucky case that the JavaScript language service doesn't work on unsaved/untitled buffers.jrieken commentedon Jun 16, 2016
We have an issue about mixing snippet suggestion with other suggestions: #2343. Closing this as a duplicate.
Arrow7000 commentedon Jun 16, 2016
Hi Johannes Rieken (@jrieken), thanks for replying. But this is more complicated because in the 2nd screenshot the file was actually saved on my desktop - albeit under the name
Untitled-1.js.So I don't understand why for two JS files, in one I get a ton of random suggested autocompletions, and in the other I only get the core snippets.
jrieken commentedon Jun 17, 2016
Because of that
Arrow7000 commentedon Jun 17, 2016
Right I see. I was confused because it was saved and had a name, albeit the name was
Untitled-1.js. But I just tried it with the identical file, only difference being a different filename and it does work as before.At least it's consistent then but the primary problem still appears.