Intelligent code-search service Sourcegraph adds Java support

Originally built to intelligently index and search Golang code bases on GitHub, Sourcegraph now works with Java—and other popular languages may follow

Developers love IDEs for the superpowers they provide: renaming a function or variable without having to blindly search and replace; jumping straight to a function definition with a keystroke; and much more.

Code-search service Sourcegraph provides those capabilities through a web-based IDE that can index most Google Go language repositories in GitHub. And not only individual repositories—all Golang repositories, indexed together and made searchable and cross-referenceable in a single interface.

Now Sourcegraph has unveiled that same kind of support for Java. Not only a near-indispensable staple of developers worldwide, Java has far more repositories in GitHub: 3.04 million, compared to Golang’s 192,700 (according to the latest GitHub API queries).

As detailed in a blog post, Sourcegraph’s Java support is functionally identical to its Golang support. Code can be explored through the web IDE and built with the same HTML/JS-powered editing components used to create Visual Studio Code. Project sources can be made accessible and searchable to members of a team working with the same repository. Highlighting a given function or variable provides a tooltip and a quick way to jump to its definition, as well as links to examples used in either that project or others.

Sourcegraph’s support for Java encompasses projects managed with Maven, Gradle, or the Android build tools, which ought to cover the vast majority of Java development use cases. However, the company cautions that some corner cases might still exist.

SourceGraph is also considering adding more languages to the roster. Beta testers can already get access to alpha support for TypeScript and JavaScript code bases; Python and PHP support is listed as coming soon.

If you sign up for the beta program, you’ll be polled about which common languages you’re interested in, including Rust, Scala, Ruby, Swift, and C/C++. It’s possible to read that as a sign the company’s considering adding support for those languages, although there’s no timetable for that yet.

Much of Sourcegraph’s work is built on top of Microsoft’s Language Server Protocol project, an open source effort that describes how to implement language-specific IDE tooling—such as jumping to a function definition—for a given language. Sourcegraph has added modifications to the protocol for its service. But one of the implications of using LSP is that any language that has LSP tools available ought to be easier to add to Soucegraph’s roster.

Sourcegraph provides three usage tiers: a free personal tier (available until Feb. 1, 2018) that can be used with private repos; a $10-per-user-per-month “organization account”; and a $50-per-use-per-month “enterprise” account that works with GitHub Enterprise, the Phabricator code review suite, and other tools.

One thing still missing is a locally hosted option—e.g., as a complement to a local install of GitHub Enterprise—but the company has no current plan to offer that.