The open-source Sourcegraph browser extension adds code intelligence to files and diffs on GitHub, GitHub Enterprise, GitLab, Phabricator, and Bitbucket Server.
When you hover your mouse over code in files, diffs, pull requests, etc., the Sourcegraph extension displays a tooltip with:
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:
To install this search engine shortcut manually, and for more information, see “Browser search engine shortcuts”.
By default, the browser extension communicates with Sourcegraph.com, which has only public code.
To use the browser extension with a different Sourcegraph instance:
By default, the Sourcegraph browser extension will only provide code intelligence on github.com. It needs additional permissions in order to run on other code hosts.
To grant these permissions:
The most common problem is:
Try the following:
In rare cases, Chrome can get into the state where the option to Enable Sourcegraph on this domain is not available when right-clicking on the extension icon. One fix we’ve observed is to toggle the site access from on, to off, then on again (see below).
If that still doesn’t work, viewing the console and network activity of the extension is the next step.
If still experiencing issues, the next step is to inspect the browser extension console output and network activity, often revealing subtle configuration errors.
If that still doesn’t help, take a screenshot of the console and network activity and attach it to a new issue so we can investigate further.
Sourcegraph integrations never send any logs, pings, usage statistics, or telemetry to Sourcegraph.com. They will only connect to Sourcegraph.com as required to provide code intelligence or other functionality on public code. As a result, no private code, private repository names, usernames, or any other specific data is sent to Sourcegraph.com.
If connected to a private, self-hosted Sourcegraph instance, Sourcegraph browser extensions will send notifications of usage to that private Sourcegraph instance only. This allows the site admins to see usage statistics.