Implement code navigation (go to definition)
Created by: ghost
Currently the atom-navigation package handles code navigation all by itself by checking what is clicked and requesting information about the clicked item. It may be more interesting to move that to a command in the core, which would work something like:
- User hovers on location in buffer.
-
atom-navigation
requests location to navigate to for that location in the buffer. - The core answers with the correct location (or a documentation URL for built-in structural elements) or a failure if there is nothing to navigate to.
- On click,
atom-navigation
navigates to the correct location or opens the link.
This has the following advantages:
- The core boasts a full PHP parser and is thus the most correct at knowing what is what.
- For clickable items, communication with the core needs to happen anyway, this bundles all communication in a single request and response.
- The functionality is reusable by other editors.
- Adding support for navigating to something new (i.e. local variables, if we were to add that) is as simple as adding it in the core, requiring no client side changes.
Edited by Gert