Update go to definition feature

Some tests on this feature are failing on Travis CI.
I tried to fix it but we had to wait for results from Travis CI again (I don't have Mac OS for quick testing).