This is a Sourcegraph extension that provides canonical examples of class and function usage in a Hover provider.
It currently only works for Go code, but can be extended to other languages.
This extension needs access to a Go examples provider. One option is to run mhewett/go-example-server on your local machine.
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.