Code navigation
- Tier: Premium, Ultimate
- Offering: GitLab.com
- Status: Beta
The availability of this feature is controlled by a feature flag. For more information, see the history.
Code navigation helps you understand unfamiliar code and how it connects to the rest of the project.
Code navigation reads the knowledge graph that GitLab Orbit builds from your code and updates as you push changes. From that graph it reads the files in your project, the classes, modules, methods, and functions they define, and which of those symbols call each other. It doesn’t need an indexer or a CI/CD job.
For a selected symbol, code navigation shows the following:
- References: The places in the project that call this symbol, also shown as a caller count.
- Calls: The symbols that this symbol calls.
- Definition: A link to the file and line where the symbol is defined.
View code navigation for a file
Prerequisites:
- The Reporter, Developer, Maintainer, or Owner role for the project.
- GitLab Orbit turned on for the project’s top-level group.
- A file on the default branch of the project. GitLab Orbit doesn’t index other branches.
To view code navigation for a file:
- In the top bar, select Search or go to and find your project.
- In the left sidebar, select Code > Repository.
- Select a file on the default branch.
- In the upper-right corner of the file, select Code navigation ( ).
If you turned on GitLab Orbit for your top-level group recently, indexing might still be in progress. The panel lists symbols when indexing is complete.
To see where a symbol is used:
- In the panel, select a symbol.
- Select References to see the symbols that call it, or Calls to see the symbols it calls.
- Select a result to open that file at the matching line.
To return to the full list of symbols, select Back to symbols.
Supported languages
Code navigation covers the languages that GitLab Orbit indexes. For the current list, see the GitLab Orbit documentation.