ternjs / tern_for_sublime

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

follow require statements #4

Closed Raynos closed 11 years ago

Raynos commented 11 years ago

It would be cool if tern followed require statements

In the expression var Quiz = require("placement-quiz/quiz-state")

If I have my cursor over the u in Quiz and hit alt+. it would be more useful if it opened the quiz-state file and then went to the module.exports declaration then if it jumped my cursor to just before Quiz

marijnh commented 11 years ago

Looking up the definition of a local variable will take you to its declaration. But if you have the node plugin enabled and try to jump to one of the properties of Quiz, it should take you to the quiz-state file. Doesn't it?

Raynos commented 11 years ago

There is no documentation for how to enable to node plugin. Also Quiz is a function with zero properties.

marijnh commented 11 years ago

There is no documentation for how to enable to node plugin.

See http://ternjs.net/doc/manual.html#configuration

Raynos commented 11 years ago

Nice thanks!