47 lines
1.7 KiB
Markdown
47 lines
1.7 KiB
Markdown
---
|
|
title: Navigating code on GitHub
|
|
intro: 'You can understand the relationships within and across repositories by navigating code directly in {% data variables.product.product_name %}.'
|
|
redirect_from:
|
|
- /articles/navigating-code-on-github
|
|
- /github/managing-files-in-a-repository/navigating-code-on-github
|
|
versions:
|
|
fpt: '*'
|
|
topics:
|
|
- Repositories
|
|
---
|
|
<!-- If you make changes to this feature, update /getting-started-with-github/github-language-support to reflect any changes to supported languages. -->
|
|
|
|
## About navigating code on {% data variables.product.prodname_dotcom %}
|
|
|
|
Code navigation uses the open source library [`tree-sitter`](https://github.com/tree-sitter/tree-sitter). The following languages are supported:
|
|
- C#
|
|
- CodeQL
|
|
- Go
|
|
- Java
|
|
- JavaScript
|
|
- PHP
|
|
- Python
|
|
- Ruby
|
|
- TypeScript
|
|
|
|
{% note %}
|
|
|
|
**Note**: Code navigation works for active branches. If the feature is enabled for you but you don't see links to the definitions of functions and methods, push to the branch and try again.
|
|
|
|
{% endnote %}
|
|
|
|
## Jumping to the definition of a function or method
|
|
|
|
You can jump to a function or method's definition within the same repository by clicking the function or method call in a file.
|
|
|
|

|
|
|
|
## Finding all references of a function or method
|
|
|
|
You can find all references for a function or method within the same repository by clicking the function or method call in a file, then clicking the **References** tab.
|
|
|
|

|
|
|
|
## Further reading
|
|
- "[Searching code](/github/searching-for-information-on-github/searching-code)"
|