Skip to content

JavaScript suggestions are currently too intrusive  #26340

Closed

Description

@arackaf
  • VSCode Version: 1.12.1
  • OS Version: Windows 10

Steps to Reproduce:

  1. Type anything - the suggestions that come up may be filtered poorly, and block out desired snippets added by extensions

Related to this Stack Overflow question: http://stackoverflow.com/questions/43850267/configure-visual-studio-code-suggestions/

It would be ideal to be able to see all sources for these suggestions, and be able to turn them off. Or any other workarounds would be much appreciated too! I selected the highlighted option in the image and tried to "go to definition" but none was found, so it appears to be really tricky tracking down the .d.ts file where these are coming from.

image

Activity

  1. nickyhajal commented on May 10, 2017

    @nickyhajal

    VSCode Version: 1.12.1
    OS Version: macOS 10.12.3

    I am experiencing this as well. As you can see, I have a perfect match with a snippet typed in the screenshot below but it's still not selected.

    segmentedbutton_js_-_client

  2. seanmcbreen commented on May 10, 2017

    @seanmcbreen

    One option we have in the interim is to add this setting to your settings:

    "editor.snippetSuggestions": "top"

    That will place snippet suggestions higher in the sort order.

  3. arackaf commented on May 10, 2017

    @arackaf
    Author

    Whoa - that's 99% of what I need. Thanks a ton Sean McBreen (@seanmcbreen)

  4. mjbvz commented on May 10, 2017

    @mjbvz
    Contributor

    Mohamed Hegazy (@mhegazy) We've seen a few requests similar to this about reducing the number of completions in JavaScript contexts. I prototyped a simple filter, but there are a few complications:

    • The interface and type completion items are usually not helpful in regular JavaScript code, but they may be needed in JSDoc comments.
    • Completion items for some types such as Promise are of kind interface but also have an instance. We cannot differentiate completions for pure interface types from those like Promise.

    We should be able to workaround the first issue on the VSCode side but the second would require a TS change. There may be other problems that I haven't considered here. Any thoughts on this?

  5. mhegazy commented on May 10, 2017

    @mhegazy

    Filtering should be done on the TS side of things. We should be able to filter compleations based on what the location allow.

  6. mhegazy commented on May 10, 2017

    @mhegazy

    Matt Bierner (@mjbvz) can you please port this to the TS repo?

  7. added
    upstreamIssue identified as 'upstream' component related (exists outside of VS Code)
    on May 10, 2017
  8. mjbvz commented on May 10, 2017

    @mjbvz
    Contributor

    Opened microsoft/TypeScript#15750 to track reducing the number of type suggestions in js files

    Closing as upstream

  9. arackaf commented on May 10, 2017

    @arackaf
    Author

    Fair enough - are you sure this couldn't be solved more easily in VS Code though? Ie, just expose all the sources of these suggestions and let users blacklist as many or as few as desired?

  10. 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

feature-requestRequest for new features or functionalityjavascriptJavaScript support issuesupstreamIssue identified as 'upstream' component related (exists outside of VS Code)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions