atom / ide-typescript

TypeScript and Javascript language support for Atom-IDE
MIT License
368 stars 63 forks source link

Improve or suppress hover that displays "any" for JavaScript functions #85

Open jasonrudolph opened 6 years ago

jasonrudolph commented 6 years ago

Description

When using ide-typescript with JavaScript files, I often see a tooltip like the one below. As far as I can tell, this tooltip isn't providing useful information. As a result, I find these tooltips distracting. Would it be possible to suppress these tooltips or enhance them in a way that they provide meaningful information about the function?

Steps to Reproduce

  1. Open atom/teletype-client:test/rest-gateway.test.js in Atom
  2. Hover over the the call to close on line 12

Expected behavior:

No tooltip appears, or tooltip appears with additional information about the close function

Actual behavior:

Tooltip appears with the word "any"

Reproduces how often:

100%

Versions

$ apm list | grep ide-
├── atom-ide-ui@0.8.1
├── ide-typescript@0.7.2

$ atom --version
Atom    : 1.25.0-dev-8ba04f0f0
Electron: 1.7.11
Chrome  : 58.0.3029.110
Node    : 7.9.0
jasonrudolph commented 6 years ago

@daviwil: Following up on our discussion in chat, here's an example of a place where the datatips are useful in JavaScript files:

  1. Open atom/teletype-client:test/rest-gateway.test.js in Atom
  2. Hover over the the call to get on line 26

damieng commented 6 years ago

About the only thing we can do here is hide 'any' responses for '.js' files. This will mean if you hover over stuff we don't have anything except 'any' for nothing will happen. Just like if it isn't working...

I'm not sure which is worse.

jackfranklin commented 6 years ago

I think that would be fine if there is a configuration option for it in settings. Doesn't matter then if it's ticked or not by default (I'll let you decide what is best) but then it would be explicit rather than implicit, which I agree could lead to it looking like it's broken.

jfurfaro commented 6 years ago

Tacking on to this, I would love the option to disable "help" datatips separately from linting datatips, or even a blacklist of methods to omit datatips. Methods defined in the project are really helpful, but I find the core language tips really distracting (especially Array.map, which always seems to put the tooltip window directly over the function I'm writing).

damieng commented 6 years ago

You can turn datatips off entirely in the atom-ide-ui settings.

jfurfaro commented 6 years ago

Unfortunately that turns off datatips for linting as well