Reputation: 4688
It is really unclear how to setup tern
to work with Sublime Text
and ES6 Modules
.
What steps should I need to take to enable it?
Upvotes: 1
Views: 1545
Reputation: 4688
tern_for_sublime
using Sublime's Package Control
Fix Mac Path
using Sublime's Package Control
(why?)Create a file named .tern-config
in you Home directory (not your project):
/Users/<your-username>/.tern-config
{
"plugins": {
"node": {},
"es_modules": {}
},
"libs": [
"ecma5",
"ecma6"
],
"ecmaVersion": 6
}
To automatically show completions after "." is typed, open your sublime preferences (found in Sublime Text > Preferences > Settings - User) and add this line:
"auto_complete_triggers": [{ "characters": ".", "selector": "source.js"}]
Optionally, you can override settings per project by creating a .tern-project
file in the root of your project.
Enjoy.
Upvotes: 3