Code intelligence provides advanced code navigation and cross-references for your code on Sourcegraph, your code host, and your code review tools:
Code intelligence works out of the box with all of the most popular programming language extensions.
You can get more accurate (but usually slower) code intelligence by enabling a dedicated language extension and setting up the corresponding language server:
Code intelligence is provided by Sourcegraph extensions and language servers that run securely in your self-hosted Sourcegraph instance. The extensions (and associated language servers) perform advanced, scalable code analysis and are derived from our popular open-source language servers in use by hundreds of thousands of developers in editors and on Sourcegraph.com.
By spinning up Sourcegraph, you can get code intelligence:
Hover tooltips with documentation and type signatures
Go to definition
GitHub pull request and file integration
Most Sourcegraph extensions that provide code intelligence require a server component, called a language server. These language servers are usually deployed alongside other Sourcegraph services in another Docker container or within the same Kubernetes cluster. Check the corresponding extension documentation for deployment instructions.
Code intelligence is powered by Sourcegraph extensions and language servers based on the open-standard Language Server Protocol (published by Microsoft, with participation from Facebook, Google, Sourcegraph, GitHub, RedHat, Twitter, Salesforce, Eclipse, and others).
Hundreds of thousands of developers already use Sourcegraph’s language servers in their editor or while browsing public code on Sourcegraph.com. Microsoft’s Visual Studio Code and GitHub’s Atom editors both use Sourcegraph language servers in official editor extensions. The language servers used for code intelligence on Sourcegraph are based on our widely used language servers, with extensive improvements for performance, cross-repository definitions and references, security, isolation, type/build inference, and robustness.
For more information about the Language Server Protocol (LSP), visit Microsoft’s official LSP site. For a more detailed list of existing language servers, visit langserver.org (maintained by Sourcegraph).