ternjs / tern_for_sublime

Sublime Text package adding Tern support
MIT License
803 stars 54 forks source link

Display popup with doc before select method etc. #107

Open PixelT opened 8 years ago

PixelT commented 8 years ago

It will be nice to display hint before select the method / function / variable etc. from autocomplete list:

preview

This option can be combined with another idea which I request: #85

marijnh commented 8 years ago

I do not understand what you are trying to suggest. What does 'hint' refer to?

easyfrog commented 8 years ago

'hint' maybe the function's parameters.

PixelT commented 8 years ago

@marijnh, I was thinking about something like this:

marijnh commented 8 years ago

Yes, that'd be cool, and the information is available to do it. Anybody want to create an implementation?

tansongyang commented 8 years ago

For everyone's information, I tried investigating what it would take to implement this, and I think it requires the ability to detect what the currently selected autocomplete option is. Unfortunately, I wasn't able to find anything in the API, and I've yet to receive a response on the forum.

easyfrog commented 8 years ago

I use TernJS the simple one to this. It can preview the parameters of function. 654

PixelT commented 8 years ago

Visual Studio Code also have a nice solution for this (description display under the method):

tansongyang commented 8 years ago

I'm interested in the idea of specifying the parameter names, but the only potential issue with that is that Sublime Text's autocomplete dropdown has a hardcoded width according to the forum. Are people OK wiith that?

PixelT commented 8 years ago

Maybe this feature can be easiest to implement, by using external sublimetext popup plugin? ( https://github.com/facelessuser/sublime-markdown-popups )

PixelT commented 7 years ago

Topic up... Maybe @facelessuser can help here?