Sourcegraph DocsSourcegraph Docs
Changelog↗
Theme
  1. Docs
  2. code-navigation
  3. language-support

Language support

See which code features Sourcegraph supports for each language.

Code Search finds text in files of any language. These features depend on the language of a file:

  • Syntax highlighting: Colors code in the file view and in search results.
  • Symbol search: Finds declarations with type:symbol searches and lists them in the symbol sidebar.
  • Search-based navigation: Go to definition and Find references from search heuristics, with no setup.
  • Syntactic navigation: More accurate navigation from syntax analysis, on instances that enable it.
  • Precise navigation: Compiler-accurate navigation from a SCIP index that an indexer creates for the repository.
  • Auto-indexing: Sourcegraph detects the project and runs the indexer itself.

Languages with full support

These languages have precise navigation, the most accurate Code Navigation:

LanguageSyntax highlightingSymbol searchSearch-based navigationSyntactic navigationPrecise navigationAuto-indexing
C✓✓✓✓✓
C#✓✓✓✓✓✓
C++✓✓✓✓✓
CUDA✓✓✓✓
Go✓✓✓✓✓✓
Java✓✓✓✓✓✓
JavaScript✓✓✓✓✓
Kotlin✓✓✓✓✓
Python✓✓✓✓✓
Ruby✓✓✓✓✓
Rust✓✓✓✓✓
Scala✓✓✓✓✓
TSX✓✓✓✓✓
TypeScript✓✓✓✓✓✓
Visual Basic .NET✓✓✓

Precise navigation for Scala needs a scip-java release before 0.13.

Languages with partial support

These languages have no syntactic navigation, precise navigation, or auto-indexing:

LanguageSyntax highlightingSymbol searchSearch-based navigation
ActionScript✓
Apex✓✓✓
AppleScript✓
ASP.NET✓
BASIC✓
Batchfile✓
BibTeX✓
Cap'n Proto✓
Classic ASP✓
Clojure✓✓✓
CMake✓
COBOL✓✓✓
Common Lisp✓✓✓
Crontab✓
CSS✓✓
D✓✓
Dart✓✓
Diff✓
DM✓
Dockerfile✓
Elixir✓✓✓
Elm✓✓
Emacs Lisp✓✓
Erlang✓✓✓
F#✓
Fish✓
Forth✓
Gherkin✓
Git Attributes✓
Git Commit✓
Git Config✓
GLSL✓
Go Checksums✓
Go Module✓
GraphQL✓✓✓
Graphviz (DOT)✓
Groovy✓✓✓
Hack✓✓
Haml✓
Haskell✓✓✓
HCL, Terraform✓
HLSL✓
HTML✓
HTML+EEX✓
HTML+ERB✓
Ignore List✓
INI✓
Java Properties✓
Java Server Pages✓
JavaScript+ERB✓
JCL✓
JSON✓
Jsonnet✓✓✓
Julia✓
Less✓✓
Literate Haskell✓
Lua✓✓✓
Magik✓✓
Makefile✓
Markdown✓✓
MATLAB✓✓
Maven POM✓
Move✓
Nickel✓
Ninja✓
Nix✓
Objective-C✓✓✓
Objective-C++✓✓
OCaml✓✓✓
Pascal✓✓✓
Perl✓✓✓
PHP✓✓✓
Pkl✓✓
PostScript✓
PowerShell✓✓✓
Protocol Buffers✓✓✓
Puppet✓
R✓✓✓
Raku✓
Regular Expression✓
reStructuredText✓
Rocq Prover (Coq)✓
Roff✓
RPM Spec✓
Sass✓✓
Scheme✓✓
SCSS✓✓
Shell✓✓✓
Smalltalk✓
Smarty✓
Solidity✓
SQL✓
Starlark✓✓
Strato✓
Stylus✓
Svelte✓✓
Swift✓✓✓
SystemVerilog✓✓✓
Tcl✓✓✓
TeX, LaTeX✓
Textile✓
Thrift✓✓✓
TOML✓
Verilog✓✓✓
VHDL✓✓✓
Vim Script✓✓
Vue✓
Vyper✓
Wikitext✓
Windows Registry Entries✓
XML✓
XML Property List✓
YAML✓
Zig✓✓✓

Files in a language without a checkmark for syntax highlighting are shown as plain text. Administrators can assign file extensions and path patterns to a language with syntaxHighlighting.languages in the site configuration.

Formats highlighted as another language

These formats have syntax highlighting only, using the grammar of the language they are based on:

Highlighted asFormats
Clojureedn
GroovyGradle
INIEditorConfig, NPM Config
JSONEcere Projects, JSON with Comments, JSONLD, Jupyter Notebook
KotlinGradle Kotlin DSL
PerlPod
PHPHTML+PHP
PythonCython, Easybuild, Snakemake
RoffRoff Manpage
SQLPLSQL, PLpgSQL, SQLPL, TSQL
ShellGentoo Ebuild, Gentoo Eclass
XMLAnt Build System, COLLADA, SVG, XPages, XProc, XSLT
YAMLBuildStream, Kaitai Struct, RAML, Unity3D Asset
Previous
Code Navigation features
Next
Search-based Code Navigation

On this page

  1. Language support

    1. Languages with full support
    1. Languages with partial support
    1. Formats highlighted as another language

Edit this page on GitHub
View as Markdown