microsoft / TypeScript-Sublime-Plugin

IO wrapper around TypeScript language services, allowing for easy consumption by editor plugins
Apache License 2.0
1.72k stars 235 forks source link

Buggy pop-up #683

Open alecmev opened 5 years ago

alecmev commented 5 years ago

I have the following code:

async function main() {}
main()

This is on default settings, so TS complains about the lack of Promise, so main on the first line gets underlined. However, when I put my cursor over it, I get this glitch (not a screengrab because I'm on a Wayland window manager, sorry...).

If I add an explicit return type - Promise<void> - it gets underlined instead of main, and I'm able to inspect the error without issues.

Linux, ST 3180, plugin 3.1.5, TS 3.1.6, Node 11.1.

roblav96 commented 5 years ago

@jeremejevs This is not a bug or a glitch, it's a default feature in sublime. To disable this, add "show_definitions": false, to your Preferences.sublime-settings.

alecmev commented 5 years ago

Having show_definitions disabled does help, but:

  1. show_definitions being enabled shouldn't interfere with anything, and I may find utility in show_definitions in other contexts and don't want to disable it.
  2. This clearly is a bug or a glitch, since the definitions don't remain visible, which isn't normal, and this issue isn't there when this plugin is disabled.

I have reason to believe that this is a regression, since this worked fine a few months ago, but, admittedly, this could also have something to do with me being on a development build of Sublime (3181 as of this message) and on a Wayland session.

Also, I've done some more testing, and even a simple snippet like this, without errors, manifests the same problem, so this isn't limited to errors/warnings:

function main() {}
main()