To install srclib, follow these steps.
The srclib command-line tool is the interface to srclib.
go get -u -v sourcegraph.com/sourcegraph/srclib/cmd/srclib
Install the standard set of toolchains:
To list installed toolchains, run
srclib toolchain list.
Right now, most people write code in editors that don't give them as much programming assistance as is possible. That's because creating an editor plugin and language analyzer for your favorite language and editor combo is a lot of work. And when you're done, your plugin only supports a single language and editor, and maybe only half the features you wanted.
Because there are no standard cross-language and cross-editor APIs and data formats, it is difficult to reuse your plugin for other languages or editors. So if there are M languages and N editors, we need to build M × N different plugins. That number gets large quickly, and so we suffer from poor developer tools.
Step 1 is to build the language analyzers. Next up, we will build the editor plugins!
srclib takes care of the code analysis that underlies key assistive features such as finding usages and jumping to definitions. It exposes a command-line API and outputs data in a well defined, language-independent format.
A plugin (or other tool) built on srclib just has to consume this data format to support all languages that srclib supports. srclib is designed to be modular and extensible. New languages can be added by implementing language toolchains that output the srclib format.
$ srclib store import && srclib store defs --limit 10)
Join the srclib mailing list to hear about support for new languages and analysis features.