Skip to content

Syntax highlighting

crc highlights with tree-sitter, compiled from C source checked into the repository rather than taken as a crate. Every grammar is pinned by checksum in third_party/CHECKSUMS.

Language Language server
Rust rust-analyzer
Python pyright
Go gopls
C and C++ clangd
JavaScript and JSX typescript-language-server
TypeScript and TSX typescript-language-server
HTML, and Svelte and Vue files none
CSS none
JSON none
TOML none
YAML none
Shell none

Languages embedded in one another, such as CSS and JavaScript inside HTML, are parsed as themselves. That is also how .svelte and .vue files are highlighted: as HTML with script and style blocks.

The Graphite theme uses eight distinct hue families, in dark and light, so keywords, functions, types, properties, strings, numbers, constants and attributes are told apart by colour.

  • Indent guides show the structure of the block you are in.
  • The bracket pair around the caret is highlighted.
  • Git marks show lines added, changed or deleted compared with HEAD, as you type.