Fix panic when clicking on a definition

This was introduced with #2420 and was caused by re-entrantly updating
the workspace. Instead of passing the workspace reference from the outside,
we now define the definition navigation as a method on the editor which solves
the issue.

Note that we also needed to introduce a `defer` call when navigating to a definition
to prevent the workspace from reading the editor during `open_project_item`.
e566929d9eAntonio Scandurra committed on 4/29/2023, 12:53:17 PMparentae5794d
3 files changedLine totals unavailable