Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions cspell-allow-list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ codellama
codemod
codemonitors
codesearch
COLLADA
collatable
colordiff
colours
Expand All @@ -150,6 +151,7 @@ ctstate
CUDA
customcert
customising
Cython
d'Ivoire
daemonset
dagre
Expand Down Expand Up @@ -184,7 +186,10 @@ drwxr
dshm
dumpall
eastus
Easybuild
EBADF
Ecere
Eclass
eksctl
ELEC
elif
Expand Down Expand Up @@ -226,6 +231,7 @@ gitea
githost
Gitolite
gitserver
GLSL
gnachman
gobwas
gofmt
Expand All @@ -235,13 +241,17 @@ googlecloud
gopkg
goreleaser
goroutines
gosyntect
graphbook
graphd
graphqlbackend
Graphviz
gsuite
Haml
healthcheck
healthz
HELO
HLSL
horsegraph
horsten
hostmatcher
Expand Down Expand Up @@ -285,6 +295,7 @@ jobutil
journalctl
Jsonnet
jsonschemadoc
Kaitai
Kaspersky
katex
keegancsmith
Expand Down Expand Up @@ -315,6 +326,7 @@ losetup
lsif
Luhansk
maedahbatool
Magik
Marino
maxage
maxmemory
Expand Down Expand Up @@ -435,6 +447,8 @@ pvcs
pykafka
quicklinks
Qwen
Raku
RAML
rbacs
readwrite
reclone
Expand All @@ -461,6 +475,8 @@ rescope
resourcemanager
Rica
Rockskip
Rocq
Roff
rootfs
rstrip
runllm
Expand Down Expand Up @@ -497,6 +513,7 @@ sigalg
Slackbot
SLES
slurpfile
Snakemake
Snek
snekpm
somerandom
Expand All @@ -506,6 +523,7 @@ sourcegraphcom
spacebar
specialised
spectaql
SQLPL
SQLSTATE
srcgraph
ssbc
Expand Down Expand Up @@ -612,6 +630,7 @@ vscodesourcegraph
waitlist
WCAG
Weaveworks
Wikitext
winsize
workspacesin
workspacesonlyfetchworkspace
Expand Down
4 changes: 1 addition & 3 deletions docs/code-navigation/auto-indexing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

With Sourcegraph deployments supporting [executors](/admin/executors/), your repository contents can be automatically analyzed to produce a code graph index file. Once [auto-indexing is enabled](/code-navigation/auto-indexing#enable-auto-indexing) and [auto-indexing policies are configured](/code-navigation/auto-indexing#configure-auto-indexing), repositories will be periodically cloned into an executor sandbox, analyzed, and the resulting index file will be uploaded back to the Sourcegraph instance.

Auto-indexing is currently available for Go, TypeScript, JavaScript, Python, Ruby and JVM repositories. See also [dependency navigation](/code-navigation/features#dependency-navigation) for instructions on how to setup cross-dependency navigation depending on what language ecosystem you use.

## Enable auto-indexing

The following docs explains how to turn on [auto-indexing](/code-navigation/auto-indexing) on your Sourcegraph instance to enable [precise code navigation](/code-navigation/precise-code-navigation).
Expand Down Expand Up @@ -144,7 +142,7 @@ For **NPM**, you can create a [secret named `NPM_TOKEN`](https://docs.npmjs.com/

## Language support

Auto-indexing is currently available for Go, TypeScript, JavaScript, Python, Ruby and JVM repositories. See also [dependency navigation](/code-navigation/features#dependency-navigation) for instructions on how to setup cross-dependency navigation depending on what language ecosystem you use.
See [language support](/code-navigation/language-support) for the languages auto-indexing supports. See also [dependency navigation](/code-navigation/features#dependency-navigation) for instructions on how to setup cross-dependency navigation depending on what language ecosystem you use.

## Lifecycle of an indexing job

Expand Down
2 changes: 1 addition & 1 deletion docs/code-navigation/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@ Learn about how Code Navigation fits into Sourcegraph in the [architecture overv

## What languages are supported?

Search-based code navigation supports 40 programming languages, including all of the most popular ones: Apex, Clojure, Cobol, C++, C#, CSS, Cuda, Dart, Elixir, Erlang, Go, GraphQL, Groovy, Haskell, Java, JavaScript, Jsonnet, Kotlin, Lisp, Lua, OCaml, Pascal, Perl, PHP, PowerShell, Protobuf, Python, R, Ruby, Rust, Scala, Shell, Starlark, Strato, Swift, Tcl, Thrift, TypeScript, Verilog, VHDL.
See [language support](/code-navigation/language-support) for the languages that each type of Code Navigation supports.
181 changes: 181 additions & 0 deletions docs/code-navigation/language-support.mdx

Large diffs are not rendered by default.

21 changes: 12 additions & 9 deletions docs/code-navigation/precise-code-navigation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ Precise code navigation relies on the open source [SCIP Code Intelligence Protoc

- [Index a Go repository](/code-navigation/how-to/index-a-go-repository#manual-indexing)
- [Index a TypeScript or JavaScript repository](/code-navigation/how-to/index-a-typescript-and-javascript-repository#manual-indexing)
- [Index a Java, Scala, or Kotlin repository](https://sourcegraph.github.io/scip-java/docs/getting-started.html)
- [Index a Python repository](https://sourcegraph.com/github.com/sourcegraph/scip-python)
- [Index a Ruby repository](https://sourcegraph.com/github.com/sourcegraph/scip-ruby)
- [Index a Java, Scala, or Kotlin repository](https://scip-code.github.io/scip-java/docs/getting-started.html)
- [Index a Python repository](https://github.com/sourcegraph/scip-python)
- [Index a Ruby repository](https://github.com/sourcegraph/scip-ruby)

2. [**Automate indexing via CI**](/code-navigation/how-to/adding-scip-to-workflows): Add indexing and uploading to your CI setup.
3. [**Auto-indexing**](/code-navigation/auto-indexing#enable-auto-indexing): Sourcegraph will automatically index your repositories and enable precise code navigation for them.
Expand All @@ -46,15 +46,18 @@ Precise Code Navigation requires language-specific indexes to be generated and u

| Language | Indexer | Status |
| ---------------------- | --------------------------------------------------------------------------------- | ---------------------- |
| Go | [scip-go](https://sourcegraph.com/github.com/sourcegraph/scip-go) | 🟢 Generally available |
| TypeScript, JavaScript | [scip-typescript](https://sourcegraph.com/github.com/sourcegraph/scip-typescript) | 🟢 Generally available |
| C, C++, CUDA | [scip-clang](https://sourcegraph.com/github.com/sourcegraph/scip-clang) | 🟢 Generally available |
| Java, Kotlin, Scala | [scip-java](https://sourcegraph.com/github.com/sourcegraph/scip-java) | 🟢 Generally available |
| Go | [scip-go](https://github.com/scip-code/scip-go) | 🟢 Generally available |
| TypeScript, JavaScript | [scip-typescript](https://github.com/sourcegraph/scip-typescript) | 🟢 Generally available |
| C, C++, CUDA | [scip-clang](https://github.com/sourcegraph/scip-clang) | 🟢 Generally available |
| Java, Kotlin | [scip-java](https://github.com/scip-code/scip-java) | 🟢 Generally available |
| Scala | [scip-java before 0.13](https://github.com/scip-code/scip-java/releases) | 🟢 Generally available |
| Rust | [rust-analyzer](https://sourcegraph.com/github.com/rust-lang/rust-analyzer) | 🟢 Generally available |
| Python | [scip-python](https://sourcegraph.com/github.com/sourcegraph/scip-python) | 🟢 Generally available |
| Ruby | [scip-ruby](https://sourcegraph.com/github.com/sourcegraph/scip-ruby) | 🟢 Generally available |
| Python | [scip-python](https://github.com/sourcegraph/scip-python) | 🟢 Generally available |
| Ruby | [scip-ruby](https://github.com/sourcegraph/scip-ruby) | 🟢 Generally available |
| C#, Visual Basic | [scip-dotnet](https://github.com/sourcegraph/scip-dotnet) | 🟢 Generally available |

scip-java 0.13 removed Scala support. To index Scala code, use an earlier scip-java release.

The easiest way to configure precise code navigation is with [auto-indexing](/code-navigation/auto-indexing). This feature uses [Sourcegraph executors](/admin/executors/) to automatically create indexes for the code, keeping precise code navigation available and up-to-date.

## Precise navigation examples
Expand Down
11 changes: 1 addition & 10 deletions docs/code-navigation/syntactic-code-navigation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,7 @@ Syntactic indexing can only be enabled if the policy type is set to HEAD – onl

## Supported languages

Syntactic code navigation requires language-specific implementations, and we currently support the following languages:

- [Java](https://www.java.com/en/)
- [Go](https://go.dev/)
- [Scala](https://scala-lang.org)
- [C#](https://learn.microsoft.com/en-us/dotnet/csharp/)
- [C++](https://isocpp.org/)

We are constantly looking to expand the list of supported languages, with Python, Typescript/Javascript, and C planned.
If you are interested in syntactic indexing for these or any other languages, please contact your Sourcegraph account representative.
Syntactic code navigation requires language-specific implementations. See [language support](/code-navigation/language-support) for the languages it supports.

## Comparison with Precise and Search-based

Expand Down
4 changes: 2 additions & 2 deletions docs/getting-started/github-vs-sourcegraph.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -236,12 +236,12 @@ With Sourcegraph, a [search context](/code-search/working/search-contexts) repre

Both GitHub and Sourcegraph offer out-of-the-box, search-based code navigation. This version of code navigation uses search-based heuristics to find references and definitions across a codebase without any setup required. It is powerful and convenient, but it can sometimes present inaccurate results. For example, it can return false positive references for symbols with common names. It is limited to returning definitions and references within a single repository (it won’t track references across multiple repositories).

GitHub’s [search-based code navigation](https://docs.github.com/en/repositories/working-with-files/using-files/navigating-code-on-github) officially supports 10 languages according to the documentation, but more languages are supported in the latest beta preview. Sourcegraph’s [search-based code navigation](/code-navigation/search-based-code-navigation) supports 40 languages.
GitHub’s [search-based code navigation](https://docs.github.com/en/repositories/working-with-files/using-files/navigating-code-on-github) officially supports 10 languages according to the documentation, but more languages are supported in the latest beta preview. Sourcegraph’s [search-based code navigation](/code-navigation/search-based-code-navigation) supports more than 40 languages.

| **Features** | **GitHub** | **Sourcegraph** |
| ------------------------ | ------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| Technical implementation | Heuristic-based | Heuristic-based |
| Language support | 10 languages (C#, CodeQL, Elixir, Go, Java, JavaScript,TypeScript, PHP, Python, Ruby) | 40 languages (The full list of supported languages can be found [here](/code-navigation/search-based-code-navigation)) |
| Language support | 10 languages (C#, CodeQL, Elixir, Go, Java, JavaScript,TypeScript, PHP, Python, Ruby) | More than 40 languages (see [language support](/code-navigation/language-support)) |
| Setup | No setup required | No setup required |
| Accuracy | Moderate (some false positives) | Moderate (some false positives) |
| Cross-repository | ✗ | ✗ |
Expand Down
4 changes: 4 additions & 0 deletions src/data/navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ export const navigation: NavigationItem[] = [
title: 'Code Navigation features',
href: '/code-navigation/features'
},
{
title: 'Language support',
href: '/code-navigation/language-support'
},
{
title: 'Search-based Code Navigation',
href: '/code-navigation/search-based-code-navigation'
Expand Down
Loading