Closed OliverJAsh closed 10 years ago
The index.js
in your tarball is a bunch of binary soup -- I guess something went wrong in uploading it.
My apologies. This one should work: http://cl.ly/2v1U3N0u1o1G/content
Works for me. I created a .tern-project
file that's just
{"plugins": {"node": true}}
If I open index.js in ST, hitting alt-. when the cursor is on foo
takes me to the definition in test.js
Ahh, I had my .tern-project
configured like so:
{
"plugins": {
"node": {
"load": true
}
}
}
When it should actually be:
{
"plugins": {
"node": true
}
}
It doesn't say anywhere in the documentation that this configuration is needed?
The load
option to the node plugin is a way to specify a regexp and tell the plugin to only load files that match it. Since true
won't match very much ("x".match(true)
is unfortunately not an error in JS), it won't load any files (unless you had one named "true").
I have configured a small Node application to test the Node plugin. Here is my isolated case.
If I try to jump to the definition of a property on a dependency, i.e.
require('./test').foo
, Tern reports "Could not find a definition."Autocompletion doesn't seem to work for the
require
d module either (seeindex.js
).In spite of this, if I do
require('util')
, autocompletion does appear to work.