code-navigation

Subscribe to all “code-navigation” posts via RSS or follow GitHub Changelog on Twitter to stay updated on everything we ship.

~ cd github-changelog
~/github-changelog|main git log main
showing all changes successfully

GitHub's code navigation features jump to definition and find all references are now available for all Rust projects on GitHub.

When you view an Rust file on github.com, you can click on the name of a function, module, or macro to see its definition and its references within that repository. We use the tree-sitter library to find definitions and call sites in your code.

Learn more about code navigation for Rust and other languages in the GitHub documentation: Navigating code on GitHub.

Also, check out the tree-sitter library to learn how support for different languages is implemented.

See more

Cross-repo code navigation is now available for all Python repositories. When showing the definition of a function or method, we now include definitions from other repositories, and from the Python standard library.

Cross-repo code navigation is powered by the stack graphs framework and by the Dependency Graph. You can read about how we use stack graphs for code navigation and visit the stack-graphs repo to learn more. You can also read more about code navigation for Python and other languages in our documentation.

See more

Understanding code is one of the most important parts of software development. Developers need to be able to quickly search, navigate, and understand their code to do their best work. That’s why we have dramatically upgraded the code search and browsing experience on GitHub with an all-new code search and code view beta that we’re excited to announce today!

You can access the new features by joining the waitlist.

A better way to search code

We’ve developed a new code search engine at GitHub completely from scratch, capable of finding relevant results with incredible speed. The all-new code search engine supports powerful features, like regular expressions, Boolean expressions, qualifiers, symbol search, and more!

We’ve also totally redesigned the search input, adding powerful capabilities like suggestions and completions as you type.

Screenshot of our redesigned search input

And the new search results UI allows you to slice and dice your results.

Screenshot of the search results page

These improvements replace the 2021 technology preview for GitHub code search at cs.github.com.

The all-new code browsing experience

This is the revamped code viewing experience for GitHub repositories. This experience has several new features including a tree pane for browsing files, symbol search, fuzzy search for files, sticky code headers, and much more! We’ve designed this code viewing experience to provide a generational jump in code browsing and viewing on GitHub.

Screenshot of the redesigned code browser

Starting with the new tree pane on the left, you can explore repository folders and files without changing pages or losing context. You can also search files within the repository, making it easier than ever to find the right file.

Screenshot of left tree pane

Moving on to the right-side symbols pane, you can simply click on a symbol in code, such as a function name, to view its definition and references across files.

Screenshot of symbols pane

In addition to symbol navigation, we re-vamped find-in-file and bound it to CMD/CTRL+F to be even better than before.

Along with the overhauled code view, we updated the blame view. You can toggle the blame view from the code view to keep context and view a file’s history.

Lastly, we reworked the file editing experience! Now you can edit a file without losing context, and we’ve made it easy to open a file in github.dev or GitHub Desktop.

There are so many features that couldn’t be listed here and we can’t wait for you to discover them! Over the next weeks we’ll ship many improvements that focus on accessibility and integrating feedback from the community.

Join the beta waitlist

We are eager for you to try the new code search and code view beta! Join the waitlist to get access.

This project is a major update to GitHub’s user experience that was made possible by the feedback you provided. Help make the experience even better by sharing your latest feedback here.

See more

GitHub's code navigation features "jump to definition" and "find all references" are now available for all Elixir projects on GitHub.

When you view an Elixir file on github.com, you can click on the name of a function, module, or macro to see its definition and its references within that repository. We use the tree-sitter library to find definitions and call sites in your code.

Special thanks to @the-mikedavis and the tree-sitter-elixir team for contributing the queries that power this system.

Learn more about code navigation for Elixir and other languages in the GitHub documentation: Navigating code on GitHub.

Also, check out the tree-sitter library to learn how support for different languages is implemented.

See more