ternjs / tern_for_sublime

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

Documentation is unclear i cant figure out how to make it work in ST3? #100

Closed maqboolkhan closed 9 years ago

maqboolkhan commented 9 years ago

Hi, Sir i really respect you as you did CodeMirror and then Tern! both are really awesome! But my problem is that i dont know how to use Tern on Sublime 3! I install this package then install all dependencies added auto_complete line in my preferences file but still its not working i got no luck :'( one thing i was missing is i could not understand this line ?

Tern uses .tern-project files to configure loading libraries and plugins for a project. See the Tern docs for details.

Thank you so much :)

yavorski commented 9 years ago

Place a .tern-project file in the root of your project.

It should like something like this:

{
  "libs": ["browser"],
  "plugins": {
    "node": {}
  }
}

If this is not working, check your sublime console for errors.

marijnh commented 9 years ago

Tern functions even without a project file -- it just won't load any plugins or definitions (for example the definitions of the browser environment).

One thing you should always include in an issue report is what is not working. What did you do? What did you expect to happen? What happened instead? "It's not working" doesn't tell us much.

maqboolkhan commented 9 years ago

@marijnh i have sort out all my problems :) should i change ur readme?

maqboolkhan commented 9 years ago

and actually it was not working without project file

marijnh commented 9 years ago

What was the problem?

maqboolkhan commented 9 years ago

sublime was not showing any suggestion but after adding project file it starts :) means first when i write document. there was no suggestion after adding of project file it now giving me all suggestions m on windows

marijnh commented 9 years ago

Yes, that's the browser definitions thing I mentioned. You get, for example [].forEach completed by default, because it is part of JavaScript itself, but the browser environment, which defines document, isn't loaded by default.

maqboolkhan commented 9 years ago

ohhh i got now am gonna blog on your awesome work :) n m sorry