Skip to content

Weird snippets suggested before obvious ones #7720

Closed

Description

@Arrow7000
  • VSCode Version: 1.21
  • OS Version: Windows 7 Professional

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.

image

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.

image

So I'm not sure what's happening here. Any suggestions would be appreciated. Thanks!

Activity

  1. jrieken commented on Jun 16, 2016

    @jrieken
    Contributor

    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.

  2. jrieken commented on Jun 16, 2016

    @jrieken
    Contributor

    We have an issue about mixing snippet suggestion with other suggestions: #2343. Closing this as a duplicate.

  3. added
    *duplicate
    on Jun 16, 2016
  4. Arrow7000 commented on Jun 16, 2016

    @Arrow7000
    Author

    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.

  5. jrieken commented on Jun 17, 2016

    @jrieken
    Contributor

    In your test case (2nd screen shot) you hit the unlucky case that the JavaScript language service doesn't work on unsaved/untitled buffers.

    Because of that

  6. Arrow7000 commented on Jun 17, 2016

    @Arrow7000
    Author

    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.

    image

    At least it's consistent then but the primary problem still appears.

  7. locked and limited conversation to collaborators on Nov 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

*duplicate

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions