Hello,
I love the goto_definition command, but it’s only working for files that are open (visible in tab view) for me. Is it possible to extend the index of goto_definition to all project files or < open files >?
Cheers,
Mershl
Hello,
I love the goto_definition command, but it’s only working for files that are open (visible in tab view) for me. Is it possible to extend the index of goto_definition to all project files or < open files >?
Cheers,
Mershl
it should work for all open files and all project files (whether open or closed) by default.
Are you perhaps using a package/language syntax that doesn’t add it’s definitions to the project index? Go to definition anywhere in the project not working
Thank you for your quick answer. This could be the problem. I’m using the ‘C Improved’ package which adds a new language syntax. I’ll need to check how to add the definitions found by C Improved to the index used by goto_defintion.
yeah, it looks like C Improved doesn’t add it’s definitions to the index: https://github.com/abusalimov/SublimeCImproved/blob/d9782343be09cf34da6a5fbb3238fcab588a9bc0/settings/Symbol%20Index%20(function%20declaration).tmPreferences#L9-L10
the readme even makes a mention of it:
I’ve clean up most of my Sublime settings now to keep it to a minimum. Changing the option for C functions inside C Improved .tmsettings didn’t fill the index after restarting Sublime.
Have you tried the C syntax shipped with ST3 recently? We did significant work on it this year, and it indexes all functions, structs, typedefs, etc.
I had this issue before. I can tell you that go to definition works across project, not just opened file.
You are having a mis config in your sublime. My solution is, backup your sublime preferences. Then remove sublime and it’s preferences complete from your computer. Re-install sublime and the packages, then try to see if jump to definition work as it should.