Skip to content
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

JavaScript suggestions are currently too intrusive #26340

Closed
arackaf opened this issue May 10, 2017 · 8 comments
Closed

JavaScript suggestions are currently too intrusive #26340

arackaf opened this issue May 10, 2017 · 8 comments
Assignees
Labels
feature-request Request for new features or functionality javascript JavaScript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@arackaf
Copy link

arackaf commented May 10, 2017

  • 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

@mjbvz mjbvz self-assigned this May 10, 2017
@nickyhajal
Copy link

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

@seanmcbreen
Copy link

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.

@arackaf
Copy link
Author

arackaf commented May 10, 2017

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

@mjbvz mjbvz added the feature-request Request for new features or functionality label May 10, 2017
@mjbvz
Copy link
Collaborator

mjbvz commented May 10, 2017

@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?

@mjbvz mjbvz added intellisense javascript JavaScript support issues labels May 10, 2017
@mhegazy
Copy link

mhegazy commented May 10, 2017

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

@mhegazy
Copy link

mhegazy commented May 10, 2017

@mjbvz can you please port this to the TS repo?

@mjbvz mjbvz added the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label May 10, 2017
@mjbvz
Copy link
Collaborator

mjbvz commented May 10, 2017

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

Closing as upstream

@mjbvz mjbvz closed this as completed May 10, 2017
@arackaf
Copy link
Author

arackaf commented May 10, 2017

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?

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality javascript JavaScript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

5 participants