Jump to definition

Close #544
Previously #635, now on a separate feature branch.