Soatl
Soatl

Reputation: 10592

IntelliJ set "Use Javascript Library" for one project and all projects

I am having a hard time trying to set the javascript libraries used for IntelliJ's auto detect features (so require() for NodeJS is not detected as an error, for example). I know how to do it for a single file, but I want to set some libraries globally, and some I want to be set for all projects. Is there a way to do this? Below is a screenshot of the option I want to set.

Setting I want to use is highlighted

Upvotes: 0

Views: 56

Answers (1)

Ruimin Wang
Ruimin Wang

Reputation: 58

Well, I just met this problem few days ago. There is such a function in Settings -> Languages&Frameworks -> JavaScript -> Libraries page. Click the Manage Scope button and then you can set libraries usage for the whole project or any specified directories.

Besides, just putting the js files of the library into project folder seems to have the same effect.

Upvotes: 1

Related Questions