Closed rmccue closed 9 years ago
Sidenote: What I'd like to do here actually is remove the preference altogether and only use the HTML approach instead. This would let us do a bit nicer parsing with the stuff we get back from CodeIntel, and would likely clean up the code a bit.
What I'd like to do down the track is add phpDoc parsing (and similar for other languages, as needed) with the ability to jump-to-definition straight from the popup, along with better styling on the prototype itself. These aren't really possible right now, since the text generator has to generate text suitable for the status line as well.
This is all stuff I'll add in separate PRs when I get to them though. :)
props for the effort. I'll just merge this and hopefully you will get some feedback!
:+1: nice!
@spectacles Any thoughts here regarding coupling the display a little more closely so we can get better views? I can structure it so it's still possible to use the other styles if you'd prefer, but either way will mean rewriting a bit of code.
Since this tooltip is not available for everybody, it's a necessity to keep support for the old tooltips! Also your solution doesn't offer a possibility to auto-insert function arguments on TAB, a feature that has been requested a lot in the past.
Since this tooltip is not available for everybody, it's a necessity to keep support for the old tooltips!
Thought so, I'll see what I can come up with :)
Also your solution doesn't offer a possibility to auto-insert function arguments on TAB, a feature that has been requested a lot in the past.
Yeah, that's on my todo list as well. :)
:sparkles: :fireworks:
This adds support for the new HTML-style popups (as per #18). I'm not sure if you want to change the default here, so I haven't included that in this patch, but happy to do so.
The approach here is based partially on Tern (marijnh/tern_for_sublime#61), as well as shamelessly stealing @jbrooksuk's CSS from Intellitip (with credit in the README). Screenshots below.
Default styling:![screenshot 2015-03-12 11 49 11](https://cloud.githubusercontent.com/assets/21655/6610640/d5e756bc-c8ad-11e4-876c-a7a7e6f041dc.png)
Dark theme:![screenshot 2015-03-12 11 49 58](https://cloud.githubusercontent.com/assets/21655/6610646/ee752e98-c8ad-11e4-836d-42c45323524b.png)
Light theme:![screenshot 2015-03-12 11 50 22](https://cloud.githubusercontent.com/assets/21655/6610652/fe17ddbe-c8ad-11e4-9417-2a130abf7a6b.png)
Happy to further improve this as needed!
One thing in particular is that it loads in the CSS file every time it renders the tooltip. I haven't noticed any issues with this so far, due to the multithreading, but it could potentially be improved. This does have the advantage that you can live-edit your CSS though.
:shipit: