Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Code completion hints don't work for most AngularJS functions #5417

Closed
somelinguist opened this issue Oct 3, 2013 · 6 comments · Fixed by #5481
Closed

Code completion hints don't work for most AngularJS functions #5417

somelinguist opened this issue Oct 3, 2013 · 6 comments · Fixed by #5481
Assignees
Milestone

Comments

@somelinguist
Copy link

Code completion hints for AngularJS seems to be limited to

angular.$$hashKey
angular.element
angular["ff-684208-preventDefault"]
angular.resumeBootstrap

If I try to type other angular functions (for example: angular.copy, angular.toJson, etc), they often show up in italics in the code completion popup, but then there is no completion info for parameters.

Is there a way to get Brackets to offer more hints?

@RaymondLim
Copy link
Contributor

@somelinguist
We don't have code completion hints for AngularJS at all. I don't even get anything that you listed when I tried it out in an empty js file. You must be trying in a file that already had some references to the listed ones.

We're using Tern as our JS code hints provider and currently Tern only provides code completion for jQuery and underscorejs using some json files (see https://github.com/marijnh/tern/tree/master/defs). So you can create a json file for AngularJS and contribute it to Tern if you want to work on it.

@ghost ghost assigned dangoor Oct 4, 2013
@njx
Copy link

njx commented Oct 4, 2013

@dangoor - could this be a side-effect of our small file size limit for Tern scanning? Does this need to be move to backlog if we need to rethink our strategy there?

@dangoor
Copy link
Contributor

dangoor commented Oct 10, 2013

@njx I think the file size limit has to do with getting code hints as you type and not with the files around. However, I have also seen bug activity recently in the Tern repo about Angular. It could be that Angular does things a bit differently than other JS projects.

This is worth investigating at least.

@dangoor
Copy link
Contributor

dangoor commented Oct 10, 2013

I'm going to put this into sprint 33, because it's likely that I can look into this while I'm also looking into #4991, which may be of a similar nature.

@dangoor
Copy link
Contributor

dangoor commented Oct 10, 2013

I have updated Tern and installed the Angular plugin for Tern. I still see exactly the results that you're seeing. I have filed a bug with Tern.

@dangoor
Copy link
Contributor

dangoor commented Oct 11, 2013

OK, this is not a bug in Tern. We need to register the Angular plugin for it to work.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants