BUILT-IN EDITOR

Syntax Highlighting

Lightweight regex-based highlighting for common source and config files.

Availability

Partially implemented in stable. Read the limits below before relying on this workflow.

Reviewed against stable v0.5.1. Rust candidate additions are labeled separately. Release status.

The pain this solves

  • Uncolored source text can be harder to scan while making a quick file edit.

What ships with it

  • Defines 11 regex-rule language profiles and a plain-text fallback.
  • Detects language from filename extension.
  • Does not use Tree-sitter or claim 50-plus grammar support.

Questions this answers

  • How many language profiles does the built-in editor define?
  • Does Chau7 use Tree-sitter?
  • How does the editor choose a language?

How it works

The stable editor defines 11 language-specific highlighting profiles and a plain-text fallback. The profiles cover common source and configuration formats such as Swift, Python, JavaScript/TypeScript extensions, shell, JSON, YAML, TOML, Markdown, Go, Rust, and Ruby.

Each profile contains regular-expression rules for selected token types. The highlighter applies these rules to editor text; this is not a Tree-sitter parser or a claim of full language grammar support.

Language selection is based on filename extension. The stable code does not promise shebang-based detection, incremental parsing, or support for 50-plus grammars.

Why it matters

Basic syntax coloring can make files easier to scan in the built-in editor. The implementation is intentionally described as regex-based highlighting so it is not mistaken for a full language parser.

Frequently asked questions

How many language definitions are present?

Eleven syntax language profiles plus a plain-text fallback are listed in the stable source.

Does Chau7 use Tree-sitter?

No. The stable editor uses NSRegularExpression highlighting rules.

How does it detect a file language?

The stable language selector matches the filename extension and falls back to plain text.