Documentation for node core modules?

I'd really like documentation to show up for node core modules when using code completion.

The documentation alludes to this being possible, but it's not really clear how to actually do it:

"When developing a Node.js application it can be convenient to have code completion, reference resolution, validation, and debugging capabilities for Node core modules (fspathhttp, etc.). However, these modules are compiled into the Node.js binary. IntelliJ IDEA provides the ability to configure these sources as a JavaScript library and associate it with your project."

Are there any simple instructions available to get this working? I tried this in IntelliJ and in WebStorm. 

 

2 comments

As fs module is resolved for you, and you have the completion, it looks like the library is already enabled. You can verify this by opening Settings | Languages & Frameworks | Node.js and NPM - can you see Node.js Core library is enabled there?

In `core-modules\fs.js` file, appendfile() function doesn't have any doc comments attached:


fs.appendFile = function(path, data, options, callback_) {

thus no docs are shown on Ctrl+Q: Quick Documentation (Ctrl+Q) shows information written in comments attached to object.  https://youtrack.jetbrains.com/issue/WEB-1946 requires providing 'external' API documentation for Node.js core modules - please feel free to vote for it

1

Ah OK, makes sense - thanks Elena!

0

Please sign in to leave a comment.