Sourcegraph comes with built-in code intelligence provided by search-based heuristics.
If you are interested in enabling precise code intelligence for your repository, see our quickstart guide.
Basic code intelligence is able to provide 3 core code intelligence features:
Basic code intelligence also filters results by file extension and by imports at the top of the file for some languages.
Basic code intelligence supports all of the most popular programming languages.
Are you using a language we don't support? File a GitHub issue or submit a PR.
Basic code intelligence uses search-based heuristics, rather than parsing the code into an abstract syntax tree (AST). Incorrect results occur more often for tokens with common names (such as Get
) than for tokens with more unique names simply because those tokens appear more often in the search index.
If you require 100% confidence in accuracy for a definition or reference results for a symbol you hovered over we recommend utilizing precise code intelligence. Scenarios where you may still get basic code intelligence results even with precision on are described in more detail in the precise code intelligence docs.