clemos / haxe-sublime-bundle

Sublime Text bundle for Haxe programming language
Apache License 2.0
237 stars 86 forks source link

Grab documentation and put it in the debug output. #115

Closed johnfn closed 10 years ago

johnfn commented 10 years ago

I thought it might be fun to find the Haxe documentation for the function you're trying to call and show the user that doc somewhere. Currently I just put it in the debug window. I'm actually not sure what would be better, so if you have any ideas, let me know.

I cache the documentation in a dictionary called documentationStore. This saves us from hitting the haxe server twice in a single function call.

clemos commented 10 years ago

It's a great idea. It might be nice to output it in the "output panel", where compilation info is displayed. In any case, I'll give it a try and probably merge it soon. Thanks !

johnfn commented 10 years ago

Yeah. I'm currently experimenting with opening a new edit panel on the bottom of the window, which seems robust and the way that other people display this sort of information. I'll let you know when I have something working :-)

johnfn commented 10 years ago

Done! It's pretty snazzy. :D

clemos commented 10 years ago

It's really awesome ! I have merged it and improved it a little :

Let me know how you find these "improvements". Thanks a lot for your work :D

johnfn commented 10 years ago

Oh, that's a lot better! I didn't realize how versatile the output window is or I would have just done that.

However there seems to be a bug. Try this:

  1. Type in "something". (including the quotes and ".". The idea is to get it to autocomplete the string methods.)
  2. Now do ctrl-f or cmd-f, and type in s
  3. The search will be cancelled and it'll show you documentation.

That's obviously no good. I'm going to see if I can figure out what you're typing into, and ensure it's actually a code window.