Sublime Forum

References disappeared from the Definitions & References tooltip

#1

I used to get this popups with both Definitions and References.
But one day recently I noticed the tooltip looks different now and there is no references:

How do I get that old style tooltip with also references back?

I tried to google my ass off and tried removing and reinstalling SublimeCodeIntel

Only thing I noticed in console, when clicking go to definition link is:

    Traceback (most recent call last):
      File "/Applications/Sublime Text 3.app/Contents/MacOS/sublime_plugin.py", line 462, in run_callback
        expr()
      File "/Applications/Sublime Text 3.app/Contents/MacOS/sublime_plugin.py", line 586, in <lambda>
        run_callback('on_selection_modified', callback, lambda: callback.on_selection_modified(v))
      File "/Users/vulfox/Library/Application Support/Sublime Text 3/Packages/SublimeCodeIntel/SublimeCodeIntel.py", line 1520, in on_selection_modified
        rowcol = view.rowcol(view_sel[0].end())
      File "/Applications/Sublime Text 3.app/Contents/MacOS/sublime.py", line 649, in __getitem__
        raise IndexError()
    IndexError

Googling does not indicate that would be the cause, but dont’t know.

2 Likes

#2

The right Screenshot shows Sublime text’s naive default implementation of symbol definitions and usages, which generally gets the job done most of the time. The right Screenshot is provided B some third-party package and conflicts with the default since ST can only show one pop-up at a time. It seems likely that SublimeCodeIntel is interfering.

1 Like

#3

TL;DR:

  • I have the same issue
  • “index_files” is true and works for definitions
  • but it does not work for references
  • even though all files are loaded, as ‘Find in files’ works fine.

I seem to have the same issue. Since the last update the Goto References do not show up in the popup.

I had a look around and noticed that there is a setting to toggle the popup altogether:

// When enabled, hovering over a word will show a popup listing all
// possible locations for the definition symbol. Requires index_files.
"show_definitions": true,

I also tried adding the line

"show_references": true,

to the user settings, but this did not do the trick.

In fact, even calling ‘Goto: References’ manually (Default: Shift+F12) does not work as it only returns “Unable to find …”. On the other hand, ‘Find in files’ (Default: Shit+Ctrl+F) finds all matches across all files. Finding the definition still works well from all references in all files.

So the question is: What might have caused this issue? Is it in the new update, or are there any packages that are known to cause this? as it seems,

I’d be more than happy to resolve this issue, as the Goto references function used to be pretty handy. ^^

1 Like

#4

Sadly, this was not fixed with version 3.2.1. Thus I am still missing this very useful feature. Am I the only one?

0 Likes

#5

Have you filed an issue for this?

1 Like

#6

Thank you for your response :blush:

Would I file this here: https://github.com/SublimeTextIssues/Core/ ?

I still don’t know if I am the only one… Maybe using ‘Find in files…’ (Ctr+Alt+F) is enough for most people?

0 Likes

#7

If you’re having an issue in which you expect the hover popup to show you definitions or references, but instead it shows you some other popup (as in the OP’s image), then try clicking in the symbol to put the caret there and use Goto > Goto Definition... or Goto > Goto Reference... and see if that helps.

This is an issue for example if you’re using the TypeScript package (though that’s not what the OP is using); the functionality is still there, but a package is blocking the normal popup.

0 Likes

#8

Nope, this is not the issue. I am using the standart popup, which works perfectly for the references:

The picture @vulfox posted is misleading. I tried to make a new picture but the popup disappears as I am hitting print.

1 Like

#9

I think I am getting closer to the bottom of this: This issue seems to be go-related, as references in .js files are found but in .go files they are not found.

Follow-up edit:

Just as I expected: This is a Go related issue. I believe that with the last update, something with the golang tools integration broke.

I reinstalled the Golang Build, GoTools, and Golang Tools Integration packages and went through the installation documentation from top to bottom. Now everything works fine again.

The question remains if this is also the answer to the problem @vulfox had. (And when will support for gotools be a native feature of sublime text? :wink: )

For all I care this topic can be closed now.

0 Likes

#10

i have meet the same problem.
and i solution is: delete the local cache and restart.
path like: xxxx\AppData\Local\Sublime Text 3

hope help~

0 Likes