Editor plugins are temporarily incompatible with srclib
download an older version of srclib to use editor plugins.
- Documentation lookups
- Type information
- Find usages (across all open-source projects globally)
First, make sure you've installed srclib, along with the toolchains for the programming
languages you're using. Once srclib is installed, you can install the emacs plugin by navigating to your
directory and cloning the repository.
cd ~/.emacs.d git clone https://github.com/sourcegraph/emacs-sourcegraph-mode.git
To install the plugin, append the following code to
(add-to-list 'load-path "~/.emacs.d/emacs-sourcegraph-mode") (require 'sourcegraph)
Sourcegraph-mode can be enabled in a buffer with M-x, then typing
Now, in any file (with
sourcegraph-mode enabled), run
(or C-M-.) to see docs, type info, and examples.
Note that the default CLI emacs app in OS X doesn't enable json-mode. Do not use it. If you do, there will be always one error message to load the .emacs file.