How do I enable Webstorm intellisense for AngularJS when writing CoffeeScript

biofractal picture biofractal · Sep 18, 2013 · Viewed 28.8k times · Source

I have setup Webstorm to recognise and compile my coffeescript files.

I have installed the AngularJS plugin and can successfully write my controllers etc in plain old javascript.

When I try to write my angular related code in CoffeeScript however I do not get any IDE support: code-completion, intellisense etc.

As a sign that all is not well, the angular variable itself is not recognised, as shown in the image below.

enter image description here

Question: How do I enable support for AngularJS in CoffeeScript files?

Thanks

Answer

biofractal picture biofractal · Sep 19, 2013

To fix the specific problem Unresolved variable or type angular you need to make sure the angular javascript libraries have been Enabled (see image below).

You do this via the WebStorm settings:

File -> Settings -> Javascript -> Libraries

Managing Javascript Libraries

Here is the relevant help section: Configuring JavaScript Libraries