Sublime Forum

Goto Definition not working for closed files

#1

Hi,

I’m using Sublime Text 4169 and recently GoTo Definition has stopped working - it only works within the current unit - or a unit that is currently open.
It will not find a unit and open it - previously it did this without fuss.

Anyone got any ideas?

0 Likes

#2

ST’s “built-in” GoTo Definition is basing on index, which is the whole project.

If you are using other plugin’s, then it’s per-plugin behavior obviously.

0 Likes

#3

I’m not using any other plug-ins - but definitions in files that are not open are not found, although the directory in which they reside has been added to the project.

This used to work.

Obviously, I must be missing some really obvious point.

Any clues?

0 Likes

#4

If you open your settings you’ll probably find this:

   "index_files": false,

Set it to true, or remove the entry completely, and the “find symbols in project” functionality should work again.

This is a problem that I have quite often (once a month or something). I believe there is some package, most likely https://github.com/wbond/package_control, that adds the entry as a temporary step, but then if you unexpectedly close ST while PC is doing its work the entry won’t get reverted.

0 Likes

#5

It seems that might indeed be the case:

0 Likes

#6

Also see https://github.com/wbond/package_control/issues/1639.
@deathaxe sorry for the ping but… are we sure this is solved? It happened to me some days ago.

0 Likes

#7

“index_files”: true,

This change works fine, thx.

0 Likes

#8

I haven’t realized any issues anymore in none of my portable setups. All package updates all worked fine with index state being restored. But maybe I just don’t meet the requirements for a possible bug to be triggered.

1 Like

#9

This (setting index_files to false) happened to me sometime between the 28th and the 30th of August.

0 Likes

#10

Package Control 4.0.8 ships some modifications to attempt improve indexer resuming reliability.

Please keep an eye on that indexer state being correctly restored.

0 Likes