WORK IN PROGRESS
Emacs mode for Sourcegraph, powered by srclib, for automatically configured, high-quality programming language support in Emacs. Currently provides:
- documentation lookups
- type information
- find usages (across all open-source projects globally)
for any language srclib supports, currently:
- Go
- JavaScript (Node.js)
Check out the screenshots below, and the screencast on YouTube.
Put this in your .emacs.d
, and then add a hook or just run sourcegraph-mode
manually to enable it in a buffer.
Be sure you've installed the srclib toolchains for the programming language you're using.
Then, in any file (with sourcegraph-mode
enabled), run sourcegraph-describe
(or C-M-.) to see docs, type info, and examples.
Docs and type info are retrieved locally if possible; otherwise they are fetched from Sourcegraph.com. Examples are always fetched from Sourcegraph.com.
Your local code is never uploaded to Sourcegraph, but the "definition paths" of things you look up are sent (to retrieve examples from the Sourcegraph API). The definition paths include the following information about the definition under your cursor (but do not include any source code):
- repository URI (e.g., "github.com/user/repo")
- package name (e.g., "foo" for an npm package named "foo")
- scope path (e.g.,
MyClass.prototype.foo
for a JavaScriptfoo
method onMyClass
)