grove
Documentation menu

Code navigation

Every search result opens in Grove’s code viewer: a file tree, syntax highlighting, blame, history and symbol navigation across all indexed repositories.

The code viewer with the file tree and a Go fileThe code viewer with the file tree and a Go file

Browsing a repository

Open a repository from a search result, from Settings → Repositories or by searching select:repo. The tabs at the top switch between Code, Commits, Branches and Tags.

  • File tree. The sidebar lists the repository’s files; long paths are shortened in the middle so the file name stays visible. Toggle it with the button left of the branch selector.
  • Switch files. Press Ctrl/⌘+P to open the file switcher and jump to any file by name.
  • Switch revisions. The branch selector opens the same file on another branch or tag.
  • Link to lines. Click a line number to highlight it; the URL keeps the selection (#L42, or #L42-60 for a range).
  • Markdown. README and other Markdown files render as a preview, with links between files of the repository working inside Grove. Switch to the source with the preview toggle.
  • Tools. The toolbar shows blame, downloads the raw file, copies its contents and opens the file on its code host.

Blame and history

Blame annotates each line with the commit, author and age of its last change; older lines fade. Click the arrow next to a commit to open it. The Commits tab lists the history of the repository, and every commit opens as a diff.

Large files are only offered as a download (10 MiB by default, see MAX_DISPLAY_BYTES in Configuration).

Definitions and references

Hover over an identifier in the code viewer to get its symbol card, then choose:

  • Find references lists every place the symbol appears.
  • Go to definition lists where it is defined, from the symbols universal-ctags extracted while indexing.
A symbol card over the code and the reference list below the editorA symbol card over the code and the reference list below the editor

Results open in a panel under the editor. Its tabs switch between references and definitions, and between this repository and other repositories, so you can see who else uses a shared type or function. Click a match to open it.

Symbol data comes from universal-ctags. Without it Grove still searches text, but definitions and sym: queries return nothing. See Deployment.

Opening code elsewhere

  • On the code host. The code host button in the toolbar opens the file on GitHub, GitLab or Bitbucket at the same revision.
  • In your IDE. Repository results offer to clone the repository in your IDE; pick the IDE under Settings → Preferences.
  • In the browser. The browser extension brings definitions and references to file pages on your code host.