Code intelligence makes browsing code easier, by adding the following features to your code:
These features are powered by language servers based on the open-source Language Server Protocol.
Code intelligence on Sourcegraph Server lets you browse code like you're in an IDE when viewing code search results. It also works on code review diffs on GitHub and Phabricator with our browser extensions.
Code intelligence is a paid feature of Sourcegraph Server. While code search works on all languages, code intelligence requires a language server for each language. So, you can add code intelligence based on your language needs.
Code intelligence can be enabled on most Sourcegraph Servers by setting two configuration options. Refer to the documentation for your language for full instructions.
Note: Currently, code intelligence is only available for Sourcegraph Server deployed with Data Center. It will soon be available for the single-server Docker image deployment. Contact us for a preview of code intelligence for the single-server deployment.
The Language Server protocol is used between a tool (the client) and a language smartness provider (the server) to integrate features like auto complete, go to definition, find all references and alike into the tool
The LSP was created by Microsoft to define a common language for programming language analyzers to speak. Today, several companies have come together to support its growth, including Red Hat, GitHub, Facebook, and Sourcegraph, and the protocol is becoming supported by a rapidly growing list of editor and language communities.
As language servers are built and improved to production-quality by the community, Sourcegraph will inevitably support code intelligence for all languages. Visit langserver.org for details on and links to current client and server implementations.
Currently, Sourcegraph has enhanced support for projects written in the following programming languages and using the following build tools out of the box. Companies with custom build systems can still get code intelligence: refer to the documentation for your language or contact [email protected] for more details.
|Go||*||Packages using cgo aren't supported|
|Java||Maven, Gradle, custom||Maven plugins will not be executed (including the
|TypeScript||npm, yarn||Use an optional
|PHP||Composer||In preview (set
|Python||pip||We don't run
As language servers are built and improved to production-quality by the community, Sourcegraph will inevitably support code intelligence for all languages.