Skip to content

Build-time code highlighting (tree-sitter) into span data #255

Open

Description

@samitbasu

In build.rs or an xtask, highlight code fences with tree-sitter-highlight (Rust first, then TOML and shell), and emit compact pre-coloured spans keyed by the code's hash, mapped onto the theme's colours. At runtime a code block is monospace rich text (#249) with a copy button. No highlighter ships in the binary, so native and web match.

Part of #248 (documentation site).

Activity

  1. added
    v0.1
    on Nov 15, 2026
  2. samitbasu commented on Nov 16, 2026

    @samitbasu
    OwnerAuthor

    Follow-up from the Markdown widget: #270 (code blocks scroll horizontally instead of wrapping). Highlighting will want a non-wrapping block too, so the two may be best done together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    v0.1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions