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
Use tern def for JSON completion? #311
Comments
For the angular directive case, I have tried to modify angular.js tern plugin like this :
But it doesn't work. |
Tern doesn't complete object literal properties. It doesn't know anything about the type of expressions that are not variables or member expressions (except for what is contained in the expression itself), so it can't help in such a case. |
Tha's really shame. I would like to provide same features than VJET http://wiki.eclipse.org/VJET/Code_Assistance_Features#Object_Literals but it seems that it's not possible with tern. |
Just for your info, you can see how to VJET declares the dojo object at http://git.eclipse.org/c/vjet/org.eclipse.vjet.typelibs.git/tree/DojoTL/src/org/dojotoolkit/Dojo.js to manage http://wiki.eclipse.org/VJET/Code_Assistance_Features#Object_Literals |
@marijnh do you think that it's possible to support object litteral or it's too hard to implement it? If it's possible,could you give some help to implement it. Thank's! I would like to provide this feature for YUI/AUI config. |
As I said, the system currently does not provide a way to do this. And I have no design that would make this possible without a lot of invasive changes. |
Ok @marijnh I stop to spam with this topic. I hope one day, tern will implement this feature. |
In many JS framework, JSON is used to configure it. Ex for angularjs directive, it returns a JSON like this :
It should be really cool if we could manage completion for JSON (restrict, templateUrl, etc).
For YUI http://yuilibrary.com/yui/docs/yui/create.html#config :
It should be cool if we could manage completion for JSON (modules, fullpath, requires, compeltion, etc).
@marijnh do you think we could manage that with tern def like?
The text was updated successfully, but these errors were encountered: