tern_for_sublime icon indicating copy to clipboard operation
tern_for_sublime copied to clipboard

TernError: No type found at the given position.

Open max-mykhailenko opened this issue 9 years ago • 5 comments

Trying goto definition, but got this alert. Error happens when open definition already on definition

max-mykhailenko avatar Sep 22 '16 18:09 max-mykhailenko

Without context, there is no way I'm going to be able to say anything useful about this. What code were you on when you tried to go to definition?

marijnh avatar Sep 22 '16 20:09 marijnh

Source file https://github.com/max-mykhailenko/react-pure-modal/blob/master/src/react-pure-modal.js TernJS config file https://github.com/max-mykhailenko/react-pure-modal/blob/master/.tern-project

Cursor position right on handleEsc method screen shot 2016-09-23 at 10 34 37 pm

max-mykhailenko avatar Sep 23 '16 19:09 max-mykhailenko

What did you expect to happen? That is its own definition, not an expression for which Tern can look up a definition. Try on .close two lines down, that should give more useful results.

marijnh avatar Sep 23 '16 19:09 marijnh

Plugin should just ignore pressing without alert if I'm already on definition. Maybe only with notification in status or message to console, but it's not necessary.

max-mykhailenko avatar Sep 24 '16 19:09 max-mykhailenko

Agreed -- that's what the Emacs plugin does. Want to write a patch to that effect?

marijnh avatar Sep 24 '16 20:09 marijnh