ternjs / tern_for_sublime

Sublime Text package adding Tern support
MIT License
801 stars 54 forks source link

Doesn't auto complete basic built-in JS #135

Closed ortonomy closed 8 years ago

ortonomy commented 8 years ago

Hey there,

I might be doing something wrong, but I followed the instructions to a 'T' for installing and getting up and running, and auto complete is working, but only for more obscure or seemingly random stuff.

Example, from your instructions suggests document.addEv should autocomplete for document.addEventListener(), but if you look the screenshot provided, it doesn't even want to autoocomplete document, let alone addEventListener:

somefile_js_and_new_issue_ _ternjs_tern_for_sublime somefile_js screen shot 2016-09-15 at 23 31 10

Any ideas why this might be happening? Why does it not seem to have the full set of javascript available?

marijnh commented 8 years ago

Sounds like you aren't loading the browser defs. Create a .tern-project file with {"libs": ["browser"]} in it.