-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delite IntelliSense for Eclipse, Sublime, Emacs, Vim, Web Editor CodeMirror #415
Comments
hi @angelozerr thanks for the proposal. This looks interesting indeed. I guess my question would be how delite specific would that be? I mean you should be able to achieve that for any AMD library that is using jsdoc for documentation? Or do you need something more that is delite specific? |
At first AMD support (inject the well instance according the module, ex : "delite/register" inject the instance to the "register" function parameter") is managed by the standard requirejs tern plugin.. After that you must define JSON type definition inside !requirejs like I have done https://github.com/angelozerr/tern-delite/blob/master/delite.js#L17 I have generated this JSON Type Definition from your JSDoc. I think there are a lot of errors, but I'm waiting for your answer to know if I continue it ot not. |
Hmm, too bad the data isn't generated automatically. It would be nice to have delite support in that editor. I'm not sure exactly what you are asking from us though. Also, I can't promise that the delite API is stabilized. There may be some future changes. |
What do you mean? The data is generated from your JavaScripts sources. The generation is doen in 2 steps :
to generate the tern plugin. In the future I have the intention to provide inside Eclipse an action which does that.
It works with several editor like Vim, Emacs, Sublime, Orion, CodeMirror, Atom and Eclipse.
@brunano21 suggested me to create this tern plugin. So I would like to know if I will take time to improve it or not.
No problem, as I have explained you, the tern-delite is generated by using your JSDoc comments. |
OK, I guess you did mention earlier that the data is generated, but why did you say that:
That made me think that you generated it by hand. |
Ok sorry with my bad english -( tern-delite is generated from JSDoc, but I have said "I think there are a lot of errors" because :
If I take the sample: require(["delite/register", "delite/Widget"], function (register, Widget) {
var MyWidget = register("my-widget", [HTMLElement, Widget], {
foo: "bar"
});
}); The register method must returns a constructor computed by using HTMLElement, Widget. This behaviour should be possible with tern. Do you want an online demo of tern-delite? |
For your information:
I have planed to work to support validation required module (inside defien or require) of RequireJS liek I have done for YUI https://github.com/angelozerr/tern.java/wiki/Tern-&-AlloyUI-support#validation-module--submodules |
Hi Delite team,
I contact you because @brunano21 suggested me to give an Eclipse support for delite angelozerr/tern.java#286
I would like to know if you could be (very) interested by this kind support. tern.java which is an Eclipse plugin based on ternjs JavaScript inference engine which gives support for completion, hover, etc and can be used with a lot of JavaScritpt Editor like Eclipse, Sublime, Emacs, Vim, Web Editor CodeMirror, Orion.
You can play with the ternjs demo at http://ternjs.net/doc/demo.html
ternjs is extensible and you can write plugins (written in JavaScript) to support any JavaScript framework. I have started to write a tern plugin for delite at https://github.com/angelozerr/tern-delite and you can see this kind feature:
Here you can see that "delite/register" is injected in the register function parameter, and you can benfit with register completion.
If you think it can be very interesting to have a delite support, don't hesitate to tell me.
Regard's Angelo
The text was updated successfully, but these errors were encountered: