Closed ghost closed 8 years ago
This sounds a lot like you're forgetting to include the "browser"
type definitions, and thus Tern doesn't know about prompt
.
Add a .tern-project
file containing something like {"libs": ["browser"]}
to your project directory.
Hi there, I might be asking something stupid but I'm a newbie so bear with me :)
In the tern.js website demo (http://ternjs.net/doc/demo/), if I type, for instance:
var x = pr
and then press CTRL + SPACE, the autocompletion dialog pops up and I can get:
var x = prompt
then if I add a parenthesis, as in:
var x = prompt(
I can get the documentation for that function:
So I end up with something like this:
var x = prompt("Foo");
Then I can type:
x.
Press CTRL + SPACE and I will get all the string functions:
In ST3 I can't get any of this functionality. If I type:
var x = pr
And press CTRL + SPACE it won't show the prompt() function.Also, if I have:
var x = prompt("Foo");
And then type:x.
It won't recognize var x as a string so it won't show the string functions autocompletion.Is this the expected behaviour or is my instalation not working properly?