JavaScript code intelligence for atom with Tern. Adds support for ES5, ES6, ES7, ES8, Node.js and more. Extendable via plugins. Uses suggestion provider by autocomplete-plus.
Example .tern-project
file (customize to your own needs):
{"ecmaVersion": 8,"libs": ["browser"],"loadEagerly": ["path/to/your/js/**/*.js"],"dontLoad": ["node_modules/**","path/to/your/js/**/*.js"],"plugins": {"es_modules": {},"node": {},"doc_comment": {"fullDocs": true,"strong": true}}}
./
as a prefix. This sometimes leads to an unexpected behaviour.node_modules
.List of keybindings.
To use your own keybindings goto atom-ternjs
package settings and disable keybindings.
In order to use third party plugins (e.g. tern-node-express):
$ cd ~/.atom/packages/atom-ternjs
$ npm install tern-node-express
Add the plugin to your .tern-project file:
{"ecmaVersion": 8,"libs": ["browser"],"loadEagerly": ["app/**/*.js"],"plugins": {"node-express": {}}}
Third party plugins are still an issue and sometimes do not work as expected, especially if the plugin requires a tern version that does not match the tern version that is used by atom-ternjs.
Restart the server: Packages -> Atom Ternjs -> Restart server
Click any item in the generated reference-list and navigate directly to file and position
Documentation
Find definition (set your cursor position to one of variable, function or instance -> open context-menu and trigger "Find definition") or use the keybindings:
Navigate back or forward
Rename variable (set your cursor position to a variable -> open context-menu and trigger "Rename") or use the keybindings:
Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.