Code navigation

Navigate your code with tooling that understands it

Code navigation enables developers to explore code by

  • jumping to definitions
  • finding references
  • listing implementations
  • browsing symbols defined in current document or folder
  • navigate dependencies
  • documentation in hover tooltips

Code navigation is made up of multiple features that build on top of each other:

Code navigation for your code

Here’s how you go from search-based code navigation to automatically-updating, precise code navigation across multiple repositories and dependencies:

  1. Navigate code with search-based code navigation and Sourcegraph extensions.

    Included in a standard Sourcegraph installation and works out of the box on the instances connected to the Internet. To see how to enable code navigation on the air-gapped instances please check this guide.

  2. Start using precise code navigation by creating an index of a repository and uploading it to your Sourcegraph instance:

  3. Optional: automate the uploading of indexes by adding indexing and uploading to your CI setup.

  4. Get automatic precise code navigation by enabling auto-indexing which makes Sourcegraph automatically index the your repositories and enable precise code navigation for them.

  5. Setup auto-dependency indexing to navigate and search through the dependencies used by your code:

Once setup, code navigation is available for use across popular development tools: