Sourcegraph browser extension

Sourcegraph for Firefox is temporarily unavailable on Mozilla’s Firefox Add-ons site. See issue #744 for a workaround and updates.

Features

Code intelligence

When you hover your mouse over code in files, diffs, pull requests, etc., the Sourcegraph extension displays a tooltip with:

Documentation and the type signature for the hovered token

Go to definition button

Find references button

Search shortcut in location bar

The Sourcegraph extension adds a search engine shortcut to your web browser that performs a search on your Sourcegraph instance. After you’ve installed it (see above), use the search shortcut it provides to perform a search:

In the Chrome or Firefox location bar, type srcSpace.

Start typing your search query.

Select an instant search suggestion or press Enter to see all results.

Configuring the Sourcegraph instance to use

By default, the browser extension communicates with Sourcegraph.com, which has only public code.

To use the browser extension with a different Sourcegraph instance:

Click the Sourcegraph extension icon in the browser toolbar to open the settings page.

Click Update and enter the URL of a Sourcegraph instance (such as https://sourcegraph.example.com or https://sourcegraph.com).

Click Save.

NOTE: The Sourcegraph instance’s site admin must update the corsOrigin site config property to allow the extension to communicate with it from all of the code hosts and other sites it will be used on. For example: