RustRover 2024.1 Help

Navigation and search

You can quickly navigate through your Rust and TOML code, as well as through the IDE elements, using various actions and popups.

Search everywhere

Search everywhere is the easiest way to find anything in the IDE - a code item, action, or UI element. Press Shift twice to open the search window. By default, the IDE displays the list of recent files.

Completion also works in this dialog to help you find the desired item, and you can narrow the search by setting the required scope.

Search everywhere

Find usages

The Find Usages action helps you search for the references of a code element across the codebase. You can search in a single file, in the whole project, or create a custom scope for your search.

Find usages in file

  1. In the editor, place the caret at a symbol you want to find.

  2. By default, the IDE automatically highlights all found usages in the file:

    Highlighting usages

    To turn this highlighting off, go to Settings | Editor | General | Code Editing and clear the Highlight on Caret Movement | Usages of element at caret checkbox.

    When automatic highlighting is disabled, you can call Find Usages for a file by pressing Ctrl+Shift+F7 or selecting Edit | Find Usages | Find Usages in File from the main menu.

Search for usages in a project

  1. Select a symbol, then right-click it and choose Find Usages from the context menu, or press Alt+F7.

  2. The IDE shows the results in the Find tool window. Here you can filter the results, group them, and jump back to the source code:

    Find usages window

Go To actions

There are several Go To actions you can use to quickly navigate through your code. Note that all navigation actions are available inside macro-generated blocks as well.

Go to actions
  • Declaration or Usages (Ctrl+B): jumps to an item's declaration; if invoked for a declaration, jumps to its usage (or shows a list of usages).

  • Type Declaration (Ctrl+Shift+B): for a variable, field, or constant, navigates to its type declaration; when invoked for a function, jumps to the declaration of the return type.

  • Definition (Implementation) (Ctrl+Alt+B): for trait elements (methods, constants, and associated types), shows the list of implementations. You can also perform this action using gutter icons.

    Go to implementation using the gutter icon
  • Go to Super Method: navigates from an item inside a trait implementation to its basic declaration in the trait.

For WASM projects, there's also a Go to generated declaration gutter marker for navigating from the #[wasm_bindgen] attribute to the corresponding TypeScript code:

Navigation via a gutter icon for Wasm

File structure

You can explore the structure of the currently opened file in the Structure tool window or in a popup.

View file structure

  • To open the Structure tool window, select View | Tool Windows | Structure from the main menu or press Alt+7.

    Structure tool window
  • To view the file structure in a popup, select Navigate | File Structure from the main menu or press Ctrl+F12.

Last modified: 11 February 2024