Sourcegraph extensions have been deprecated with the September 2022 Sourcegraph release. Learn more.
The repo and the docs below are kept to support older Sourcegraph versions.
Lets you easily search for all files using a python module. Adds a new operator py.imports:
for all import statements of the module passed to the operator.
NOTE: regular expression search mode is required for the py.imports
keyword to work. The extension automatically appends patternType:regexp
to queries containing py.imports
.
This extension also adds a "See all usages" link at the end of import statement lines, which will execute the py.imports
search for the relevant module. To enable "See all usages" links, add "pyImports.showAllUsagesLinks": true
to your user settings.
Sourcegraph extensions are written in TypeScript and are distributed as bundled JavaScript files that run on the client. For creation, publishing, and viewing, you need:
- Creation: Install Node.js.
- Publishing: Install the Sourcegraph CLI (
src
) and create a Sourcegraph.com account. - Viewing: Install the Sourcegraph extension for Chrome or Firefox.
npm install
npm run tslint
npm run typecheck
src extensions publish
Visit the Sourcegraph extension documentation and check out some Sourcegraph extension samples.